CWE-1249 Base Incomplet

Application-Level Admin Tool with Inconsistent View of Underlying Operating System

This vulnerability occurs when an administrative tool (like a web interface or API) fails to accurately display the true state of the underlying operating system it manages. The tool's view becomes…

Définition

What is CWE-1249?

This vulnerability occurs when an administrative tool (like a web interface or API) fails to accurately display the true state of the underlying operating system it manages. The tool's view becomes inconsistent with reality, hiding critical resources like user accounts, processes, or files from the administrator.
Administrative tools for cloud platforms, network devices, or IoT systems often manage OS-level resources like user accounts. A critical security gap emerges when this management layer loses synchronization with the actual OS state. For instance, if an attacker adds a user account directly to the OS, this 'ghost account' might remain invisible in the admin panel. This discrepancy allows malicious activity to go undetected, as administrators rely on an incomplete and misleading view of their system's security posture. Attackers exploit this weakness by creating persistent backdoor accounts, often by chaining it with other vulnerabilities like command injection or logic flaws. A rogue administrator could also hide accounts for later use. Since the management tool doesn't reflect these changes, standard administrative reviews won't uncover them, allowing threats to persist undetected. Ensuring the management application's data model is always synchronized with a single, authoritative source of truth in the OS is essential for maintaining visibility and control.
Impact réel

Real-world CVEs caused by CWE-1249

Aucune référence CVE publique n'est liée à ce CWE dans le catalogue MITRE pour le moment.

Comment les attaquants l'exploitent

Parcours de l'attaquant étape par étape

  1. 1

    Suppose that an attacker successfully gains root privileges on a Linux system and adds a new 'user2' account:

  2. 2

    This new user2 account would not be noticed on the web interface, if the interface does not refresh its data of available users.

  3. 3

    It could be argued that for this specific example, an attacker with root privileges would be likely to compromise the admin tool or otherwise feed it with false data. However, this example shows how the discrepancy in critical data can help attackers to escape detection.

Exemple de code vulnérable

Vulnerable Other

Suppose that an attacker successfully gains root privileges on a Linux system and adds a new 'user2' account:

Vulnérable Other
echo "user2:x:0:0::/root:/" >> /etc/passwd;
  echo "user2:\$6\$IdvyrM6VJnG8Su5U\$1gmW3Nm.IO4vxTQDQ1C8urm72JCadOHZQwqiH/nRtL8dPY80xS4Ovsv5bPCMWnXKKWwmsocSWXupUf17LB3oS.:17256:0:99999:7:::" >> /etc/shadow;
Charge utile de l'attaquant

Suppose that an attacker successfully gains root privileges on a Linux system and adds a new 'user2' account:

Charge utile de l'attaquant Other
echo "user2:x:0:0::/root:/" >> /etc/passwd;
  echo "user2:\$6\$IdvyrM6VJnG8Su5U\$1gmW3Nm.IO4vxTQDQ1C8urm72JCadOHZQwqiH/nRtL8dPY80xS4Ovsv5bPCMWnXKKWwmsocSWXupUf17LB3oS.:17256:0:99999:7:::" >> /etc/shadow;
Exemple de code sécurisé

Secure pseudo

Sécurisé pseudo
// Validate, sanitize, or use a safe API before reaching the sink.
function handleRequest(input) {
  const safe = validateAndEscape(input);
  return executeWithGuards(safe);
}
What changed: the unsafe sink is replaced (or the input is validated/escaped) so the same payload no longer triggers the weakness.
Liste de contrôle de prévention

How to prevent CWE-1249

  • Architecture and Design Ensure that the admin tool refreshes its model of the underlying OS on a regular basis, and note any inconsistencies with configuration files or other data sources that are expected to have the same data.
Signaux de détection

How to detect CWE-1249

SAST High

Exécuter une analyse statique (SAST) sur le code source à la recherche du motif non sécurisé dans le flux de données.

DAST Moderate

Exécuter des tests de sécurité applicative dynamique (DAST) contre le point de terminaison en ligne.

Runtime Moderate

Surveiller les journaux runtime pour détecter des traces d'exception inhabituelles, des entrées malformées ou des tentatives de contournement d'autorisation.

Code review Moderate

Revue de code : signaler tout nouveau code qui traite les entrées de cette surface sans utiliser les helpers du framework validés.

Correction automatique Plexicus

Plexicus détecte automatiquement CWE-1249 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.

Questions fréquentes

Frequently asked questions

Qu'est-ce que CWE-1249 ?

This vulnerability occurs when an administrative tool (like a web interface or API) fails to accurately display the true state of the underlying operating system it manages. The tool's view becomes inconsistent with reality, hiding critical resources like user accounts, processes, or files from the administrator.

Quelle est la gravité de CWE-1249 ?

MITRE n'a pas publié de note de probabilité d'exploitation pour cette faiblesse. Traitez-la comme un impact moyen jusqu'à ce que votre modèle de menace prouve le contraire.

Quels langages ou plateformes sont affectés par CWE-1249 ?

MITRE lists the following affected platforms: Not OS-Specific, Web Based.

Comment puis-je prévenir CWE-1249 ?

Ensure that the admin tool refreshes its model of the underlying OS on a regular basis, and note any inconsistencies with configuration files or other data sources that are expected to have the same data.

Comment Plexicus détecte et corrige CWE-1249 ?

Le moteur SAST de Plexicus reconnaît la signature de flux de données de CWE-1249 à 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-1249 ?

MITRE publie la définition canonique à https://cwe.mitre.org/data/definitions/1249.html. Vous pouvez également consulter la documentation OWASP et NIST pour des conseils adjacents.

Prêt quand vous l'êtes

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.