Summary
USGS ARMI accepts uploaded files without adequately restricting their type and stores them under an uploads path. An authenticated remote attacker who uploads a crafted PHP file may be able to execute server-side commands when the file is accessed, if the server processes PHP in that location.
Affected context
The vulnerability occurs in ARMI's file upload and storage flow. Risk depends on the upload endpoint being reachable by an authenticated user and on uploaded files being accessible from a location where the server executes PHP. The described behavior stores uploads under /uploads/{upload-file}.
Exploit preconditions
- Attack surface: ARMI's remote file-upload functionality
- Required access: An authenticated account with permission to upload files
- Trigger point: The uploaded file is later accessed through the server
- Why exploitation is possible: The application accepts crafted files and stores them at a path where PHP may be executed
Why this happens
The application does not sufficiently restrict uploaded file types or prevent uploaded content from being treated as executable code. This maps to CWE-434: Unrestricted Upload of File with Dangerous Type. The insecure pattern is placing attacker-controlled files in a web-accessible location without reliably separating data storage from server-side execution.
Potential impact
- An attacker could execute commands with the privileges of the web-server process.
- The attacker may be able to access or alter data available to that process.
- The affected application or host could be compromised.
- The incident could lead to service disruption or further unauthorized activity.
General mitigation guidance
Common defensive patterns include:
- Allowing only necessary file types, using server-side allowlists and content validation rather than trusting filenames or client-provided MIME types.
- Storing uploads outside the web root or serving them through a handler that treats content strictly as data.
- Disabling script execution in upload directories and using generated storage names.
- Applying size limits, malware scanning where appropriate, and least-privilege filesystem permissions.
- Requiring authentication and narrowly scoped authorization for upload operations.
How teams detect issues like this
Detection approaches may include:
- Reviewing upload handlers for missing type, content, and size restrictions.
- Using static analysis to flag user-controlled files written to web-accessible paths.
- Auditing web-server configuration and policies to ensure upload locations cannot execute scripts.
- Monitoring upload and access logs for unexpected file types, executable requests, and unusual server-side command activity.
- Using automated security checks in code review and CI to enforce upload-handling policies.

