CWE-552: Files or Directories Accessible to External… | Glexia
CWE-552 (Files or Directories Accessible to External Parties) weakness overview with consequences, detection methods, mitigations, related CVEs and MITRE ATT&CK…
Glexia's Take · Automated analysis
CWE-552: Files or Directories Accessible to External Parties
Files or Directories Accessible to External Parties represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Executive Impact
- Confidentiality,Integrity: Read Files or Directories,Modify Files or Directories
Developer Pattern
CWE-552 is the kind of defect developers can usually prevent with explicit validation, safer framework defaults, and tests that exercise hostile input or unsafe state transitions.
Automation confidence
high confidence from CWE-552, 4.20.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Official CWE Definition
CWE-552: Files or Directories Accessible to External Parties
The product makes files or directories accessible to unauthorized actors, even though they should not be.
Developer And Remediation Guidance
How teams prevent and detect this weakness
Causes
- The following Azure command updates the settings for a storage account: However, "Allow Blob Public Access" is set to true, meaning that anonymous/public users can access blobs.,The command could be modified to disable "Allow Blob Public Access" by setting it to false.
- The following Google Cloud Storage command gets the settings for a storage account named 'BUCKET_NAME': Suppose the command returns the following result:,This result includes the "allUsers" or IAM role added as members, causing this policy configuration to allow public access to cloud storage resources. There would be a similar concern if "allAuthenticatedUsers" was present.,The command could be modified to remove "allUsers" and/or "allAuthenticatedUsers" as follows:
Remediation
- Implementation,System Configuration,Operation: When storing data in the cloud (e.g., S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to disable public access.
Detection
- Automated Static Analysis: 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.)
Mappings
Related CVEs, CWEs, and ATT&CK context
Related CWEs
- CWE-219: Storage of File with Sensitive Data Under Web Root
- CWE-220: Storage of File With Sensitive Data Under FTP Root
- CWE-527: Exposure of Version-Control Repository to an Unauthorized Control Sphere
- CWE-528: Exposure of Core Dump File to an Unauthorized Control Sphere
- CWE-529: Exposure of Access Control List Files to an Unauthorized Control Sphere
- CWE-530: Exposure of Backup File to an Unauthorized Control Sphere
- CWE-539: Use of Persistent Cookies Containing Sensitive Information
- CWE-285: Improper Authorization
- CWE-668: Exposure of Resource to Wrong Sphere
- CWE-668: Exposure of Resource to Wrong Sphere
- CWE-553: Command Shell in Externally Accessible Directory
ATT&CK Relevance
ATT&CK relevance is shown only when reviewed or responsibly inferred.
