Private personal data can enter a program in a variety of ways: - Directly from the user in the form of a password or personal information - Accessed from a database or other data store by the application - Indirectly from a partner or other third party If the data is written to an external location - such as the console, file system, or network - a privacy violation may occur.
Exposure of Private Personal Information to an Unauthorized Actor
This vulnerability occurs when an application fails to adequately protect sensitive personal data, allowing access to individuals who either lack proper authorization or haven't provided necessary…
What is CWE-359?
Real-world CVEs caused by CWE-359
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
The following code contains a logging statement that tracks the contents of records added to a database by storing them in a log file. Among other values that are stored, the getPassword() function returns the user-supplied plaintext password associated with the account.
- 2
The code in the example above logs a plaintext password to the filesystem. Although many developers trust the filesystem as a safe storage location for data, it should not be trusted implicitly, particularly when privacy is a concern.
- 3
This code uses location to determine the user's current US State location.
- 4
First the application must declare that it requires the ACCESS_FINE_LOCATION permission in the application's manifest.xml:
- 5
During execution, a call to getLastLocation() will return a location based on the application's location permissions. In this case the application has permission for the most accurate location possible:
Vulnerable C#
The following code contains a logging statement that tracks the contents of records added to a database by storing them in a log file. Among other values that are stored, the getPassword() function returns the user-supplied plaintext password associated with the account.
pass = GetPassword();
...
dbmsLog.WriteLine(id + ":" + pass + ":" + type + ":" + tstamp); 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-359
- Requirements Identify and consult all relevant regulations for personal privacy. An organization may be required to comply with certain federal and state regulations, depending on its location, the type of business it conducts, and the nature of any private data it handles. Regulations may include Safe Harbor Privacy Framework [REF-340], Gramm-Leach Bliley Act (GLBA) [REF-341], Health Insurance Portability and Accountability Act (HIPAA) [REF-342], General Data Protection Regulation (GDPR) [REF-1047], California Consumer Privacy Act (CCPA) [REF-1048], and others.
- Architecture and Design Carefully evaluate how secure design may interfere with privacy, and vice versa. Security and privacy concerns often seem to compete with each other. From a security perspective, all important operations should be recorded so that any anomalous activity can later be identified. However, when private data is involved, this practice can in fact create risk. Although there are many ways in which private data can be handled unsafely, a common risk stems from misplaced trust. Programmers often trust the operating environment in which a program runs, and therefore believe that it is acceptable store private information on the file system, in the registry, or in other locally-controlled resources. However, even if access to certain resources is restricted, this does not guarantee that the individuals who do have access can be trusted.
How to detect CWE-359
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Plexicus détecte automatiquement CWE-359 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-359 ?
This vulnerability occurs when an application fails to adequately protect sensitive personal data, allowing access to individuals who either lack proper authorization or haven't provided necessary consent for its use.
Quelle est la gravité de CWE-359 ?
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-359 ?
MITRE lists the following affected platforms: Mobile.
Comment puis-je prévenir CWE-359 ?
Identify and consult all relevant regulations for personal privacy. An organization may be required to comply with certain federal and state regulations, depending on its location, the type of business it conducts, and the nature of any private data it handles. Regulations may include Safe Harbor Privacy Framework [REF-340], Gramm-Leach Bliley Act (GLBA) [REF-341], Health Insurance Portability and Accountability Act (HIPAA) [REF-342], General Data Protection Regulation (GDPR) [REF-1047],…
Comment Plexicus détecte et corrige CWE-359 ?
Le moteur SAST de Plexicus reconnaît la signature de flux de données de CWE-359 à 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-359 ?
MITRE publie la définition canonique à https://cwe.mitre.org/data/definitions/359.html. Vous pouvez également consulter la documentation OWASP et NIST pour des conseils adjacents.
Weaknesses related to CWE-359
Exposure of Sensitive Information to an Unauthorized Actor
This weakness occurs when an application unintentionally reveals sensitive data to someone who shouldn't have access to it.
Exposure of Sensitive System Information Due to Uncleared Debug Information
This vulnerability occurs when hardware fails to erase sensitive data like cryptographic keys and intermediate values before entering…
Device Unlock Credential Sharing
This vulnerability occurs when the secret keys or passwords required to unlock a device's hidden features are shared between multiple…
Debug Messages Revealing Unnecessary Information
The product's debug messages or logs expose excessive internal system details, potentially revealing sensitive information that could aid…
Driving Intermediate Cryptographic State/Results to Hardware Module Outputs
This vulnerability occurs when a hardware cryptographic module leaks sensitive internal data through its output channels. Instead of only…
Insertion of Sensitive Information Into Sent Data
This vulnerability occurs when an application sends data to an external party, but accidentally includes sensitive information—like…
Observable Discrepancy
This vulnerability occurs when an application responds differently to unauthorized users based on internal conditions. Attackers can…
Generation of Error Message Containing Sensitive Information
This vulnerability occurs when an application reveals sensitive details about its internal systems, user data, or environment within error…
Exposure of Sensitive Information Due to Incompatible Policies
This vulnerability occurs when a system's data handling aligns with the developer's security rules but accidentally reveals information…
Further reading
- MITRE — CWE-359 officiel https://cwe.mitre.org/data/definitions/359.html
- Seven Pernicious Kingdoms: A Taxonomy of Software Security Errors https://samate.nist.gov/SSATTM_Content/papers/Seven%20Pernicious%20Kingdoms%20-%20Taxonomy%20of%20Sw%20Security%20Errors%20-%20Tsipenyuk%20-%20Chess%20-%20McGraw.pdf
- AOL man pleads guilty to selling 92m email addies https://www.theregister.com/2005/02/07/aol_email_theft/
- Guide to Protecting the Confidentiality of Personally Identifiable Information (SP 800-122) https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-122.pdf
- Safe Harbor Privacy Framework https://web.archive.org/web/20010223203241/http://www.export.gov/safeharbor/
- Financial Privacy: The Gramm-Leach Bliley Act (GLBA) https://www.ftc.gov/business-guidance/privacy-security/gramm-leach-bliley-act
- Health Insurance Portability and Accountability Act (HIPAA) https://www.hhs.gov/hipaa/index.html
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.