Exécuter une analyse statique (SAST) sur le code source à la recherche du motif non sécurisé dans le flux de données.
Addition of Data Structure Sentinel
This vulnerability occurs when a program unintentionally adds or modifies a special marker, known as a sentinel, within a data structure, leading to critical logic errors.
What is CWE-464?
Real-world CVEs caused by CWE-464
Aucune référence CVE publique n'est liée à ce CWE dans le catalogue MITRE pour le moment.
Parcours de l'attaquant étape par étape
- 1
Identifier un chemin de code qui traite des entrées non fiables sans validation.
- 2
Élaborer une charge utile qui exploite le comportement non sécurisé — injection, traversal, débordement ou abus de logique.
- 3
Délivrer la charge utile via une requête normale et observer la réaction de l'application.
- 4
Itérer jusqu'à ce que la réponse divulgue des données, exécute le code de l'attaquant ou élève les privilèges.
Vulnerable C
The following example assigns some character values to a list of characters and prints them each individually, and then as a string. The third character value is intended to be an integer taken from user input and converted to an int.
char *foo;
foo=malloc(sizeof(char)*5);
foo[0]='a';
foo[1]='a';
foo[2]=fgetc(stdin);
foo[3]='c';
foo[4]='\0';
printf("%c %c %c %c %c \n",foo[0],foo[1],foo[2],foo[3],foo[4]);
printf("%s\n",foo); Secure pseudo
// Validate, sanitize, or use a safe API before reaching the sink.
function handleRequest(input) {
const safe = validateAndEscape(input);
return executeWithGuards(safe);
} How to prevent CWE-464
- Implementation / Architecture and Design Encapsulate the user from interacting with data sentinels. Validate user input to verify that sentinels are not present.
- Implementation Proper error checking can reduce the risk of inadvertently introducing sentinel values into data. For example, if a parsing function fails or encounters an error, it might return a value that is the same as the sentinel.
- Architecture and Design Use an abstraction library to abstract away risky APIs. This is not a complete solution.
- Operation Use OS-level preventative functionality. This is not a complete solution.
How to detect CWE-464
Exécuter des tests de sécurité applicative dynamique (DAST) contre le point de terminaison en ligne.
Surveiller les journaux runtime pour détecter des traces d'exception inhabituelles, des entrées malformées ou des tentatives de contournement d'autorisation.
Revue de code : signaler tout nouveau code qui traite les entrées de cette surface sans utiliser les helpers du framework validés.
Plexicus détecte automatiquement CWE-464 et ouvre une PR de correction en moins de 60 secondes.
Codex Remedium analyse chaque commit, identifie cette faiblesse précise et livre une pull request prête à être relue avec le correctif. Pas de tickets. Pas de transferts.
Frequently asked questions
Qu'est-ce que CWE-464 ?
This vulnerability occurs when a program unintentionally adds or modifies a special marker, known as a sentinel, within a data structure, leading to critical logic errors.
Quelle est la gravité de CWE-464 ?
MITRE évalue la probabilité d'exploitation comme Élevée — cette faiblesse est activement exploitée et doit être priorisée pour la remédiation.
Quels langages ou plateformes sont affectés par CWE-464 ?
MITRE lists the following affected platforms: C, C++.
Comment puis-je prévenir CWE-464 ?
Encapsulate the user from interacting with data sentinels. Validate user input to verify that sentinels are not present. Proper error checking can reduce the risk of inadvertently introducing sentinel values into data. For example, if a parsing function fails or encounters an error, it might return a value that is the same as the sentinel.
Comment Plexicus détecte et corrige CWE-464 ?
Le moteur SAST de Plexicus reconnaît la signature de flux de données de CWE-464 à chaque commit. Lorsqu'une correspondance est trouvée, notre agent Codex Remedium ouvre une PR de correction avec le code corrigé, les tests et un résumé d'une ligne pour le relecteur.
Où puis-je en savoir plus sur CWE-464 ?
MITRE publie la définition canonique à https://cwe.mitre.org/data/definitions/464.html. Vous pouvez également consulter la documentation OWASP et NIST pour des conseils adjacents.
Weaknesses related to CWE-464
Improper Neutralization of Special Elements
This vulnerability occurs when an application accepts external input but fails to properly sanitize special characters or syntax that have…
Improper Neutralization of Delimiters
This vulnerability occurs when an application fails to properly handle or sanitize delimiter characters within data inputs, allowing them…
Improper Neutralization of Input Terminators
This vulnerability occurs when an application accepts external input but fails to properly handle special characters that downstream…
Improper Neutralization of Input Leaders
This vulnerability occurs when an application fails to properly validate or handle input that begins with special control characters or…
Improper Neutralization of Quoting Syntax
This vulnerability occurs when an application fails to properly validate or escape quote characters (like single ' or double " quotes) in…
Improper Neutralization of Escape, Meta, or Control Sequences
This vulnerability occurs when an application fails to properly sanitize or escape special character sequences in user-supplied input…
Improper Neutralization of Comment Delimiters
This vulnerability occurs when an application accepts user input and fails to properly sanitize characters that can be interpreted as…
Improper Neutralization of Macro Symbols
This vulnerability occurs when an application accepts user input containing macro symbols (like those used in templates or configuration…
Improper Neutralization of Substitution Characters
This vulnerability occurs when an application accepts user input and fails to properly sanitize special characters that can trigger…
Arrêtez de payer par développeur.
Commencez à fermer la boucle.
Plexicus est l'ASPM natif IA qui scanne, filtre, corrige, penteste et explique — de façon autonome. Développeurs illimités, dépôts illimités, actions IA à usage équitable. Vrai niveau gratuit, €269/mo annuel quand vous êtes prêt.