Exposure of Backup File to an Unauthorized Control Sphere

Incomplete Variant
Structure: Simple
Description

This vulnerability occurs when backup or temporary files are stored in locations that unauthorized users can access, such as web directories.

Extended Description

Developers and systems often create backup copies of live files, sometimes automatically renaming them with extensions like .bak, .old, or .~bk. When these files are left within a publicly accessible directory—like a web server's root—attackers can directly request and download them. This exposes source code, configuration files, or sensitive data that should remain protected. Manually finding and securing every misplaced backup file across a complex application is error-prone. An ASPM platform like Plexicus can automatically detect these exposed files across your entire stack, using SAST and DAST techniques to identify the risk. Furthermore, Plexicus's AI-driven remediation can provide specific guidance on moving or deleting these files, helping you close the gap quickly and consistently.

Common Consequences 1
Scope: Confidentiality

Impact: Read Application Data

At a minimum, an attacker who retrieves this file would have all the information contained in it, whether that be database calls, the format of parameters accepted by the application, or simply information regarding the architectural structure of your site.

Detection Methods 1
Automated Static AnalysisHigh
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.)
Potential Mitigations 1
Phase: Policy
Recommendations include implementing a security policy within your organization that prohibits backing up web application source code in the webroot.
Modes of Introduction
Operation