Summary
Atomic Server's download handler can use an attacker-controlled resource identifier to construct a filesystem path without adequate validation. An authenticated Agent who can set that identifier on an owned resource may be able to read files accessible to the server process, potentially including server configuration containing the root Agent's private key.
Affected context
The issue affects Atomic Server's Commit application path and download handler. It becomes risky when an authenticated Agent can assign an unvalidated internalId to an owned resource and the resulting value is used to open a file without checking that the resolved path stays within an intended directory or that the target is an allowed file.
Exploit preconditions
- Attack surface: The resource Commit path and the
/downloadhandler - Required access: An authenticated Agent with the ability to modify an owned resource's
internalId - Trigger point: A download request that uses the modified resource identifier to construct and open a filesystem path
- Why exploitation is possible: The path is not adequately sanitized or checked for containment, allowing traversal or absolute paths to reach files available to the server process
Why this happens
The application accepts an unvalidated value for a server-managed identifier and later treats it as a filesystem path component. Without path normalization and containment checks, traversal sequences or absolute paths can escape the intended storage location. This is a path traversal weakness mapped to CWE-22: Improper Limitation of a Pathname to a Restricted Directory.
Potential impact
- An attacker may read files that the server process can access.
- Sensitive configuration data, including the root Agent's private key, could be exposed.
- Disclosure of the root key could allow root impersonation and broader access to server data.
- Depending on the resulting access, an attacker could gain read, write, or delete capabilities over server data.
General mitigation guidance
Defensive patterns focus on keeping user-influenced identifiers separate from filesystem paths and enforcing strict boundaries wherever files are opened.
- Use server-generated identifiers or map validated identifiers to fixed storage locations.
- Resolve paths and verify that they remain within an explicitly authorized directory before opening them.
- Enforce file-class and resource-authorization checks before serving a download.
- Treat resource metadata as untrusted, even when it is stored server-side or modified by an authenticated user.
- Limit the server process's filesystem access and protect sensitive configuration and key material with least privilege.
How teams detect issues like this
- Use static analysis to identify filesystem APIs that receive user-influenced values or resource metadata.
- Review code paths that assign server-managed identifiers and trace their use into path construction and file-opening operations.
- Enforce code-review policies requiring path containment checks and authorization before file access.
- Monitor download activity for requests that resolve outside expected storage directories or target sensitive files.
- Automated security review tools can help flag untrusted data flows into filesystem operations.

