/

CVE-2025-60947

Severity:

HIGH RISK

(8.8)

Unrestricted File Upload in Census CSWeb 8.0.1

CVE-2025-60947

Analyzed

Vulnerability type

Category:

Unrestricted File Upload

CWE:

CWE-434

Impact:

Remote Code Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Census CSWeb 8.0.1 contains an unrestricted file upload vulnerability that allows authenticated remote users to upload arbitrary files to the server.

If an attacker can place executable or script files in a web-accessible or interpretable location, this may lead to remote code execution under the web server's privileges.

Affected context

The vulnerability occurs in Census CSWeb version 8.0.1 when handling user-supplied file uploads after authentication.

The application does not sufficiently restrict the type, content, or storage location of uploaded files, and in some environments these files may be placed where the server or interpreter can execute them.

The issue is relevant in deployments where authenticated users have upload capabilities and where uploaded content is processed or exposed by the server.

Exploit preconditions

  • Attack surface: Remote via the CSWeb HTTP(S) interface
  • Required access: Valid authenticated account with permission to perform file uploads
  • Trigger point: Submission of a crafted file through an upload feature that stores the file on the server
  • Why exploitation is possible: The upload functionality does not enforce strict validation of file type and content or adequately control where files are stored, enabling potentially executable files to be uploaded and reached by the server.

Why this happens

This is an instance of CWE-434: Unrestricted Upload of File with Dangerous Type, where an application accepts user-controlled files without robust checks and stores them in locations that can be interpreted as code.

The upload handler appears to rely on weak or missing server-side validation and storage controls, allowing attackers to bypass intended restrictions and introduce executable content into the application environment.

Conceptually, the bug stems from treating user-uploaded files as benign assets without enforcing strict type validation, content inspection, or execution barriers between data and code.

Potential impact

  • Remote code execution on the server through uploaded executable or script files
  • Installation of web shells or backdoors for persistent access
  • Unauthorized access to sensitive data hosted on or reachable from the server
  • Use of the compromised server as a pivot point for lateral movement within the network
  • Defacement or manipulation of web content using uploaded files

General mitigation guidance

Effective mitigation centers on treating all uploaded files as untrusted and ensuring they cannot be executed as code.

Recommended defensive patterns include:

  • Enforcing strict server-side validation of file types using allowlists, independent of client-side metadata or extensions
  • Storing uploads outside of web-accessible or interpreter-executable directories, and serving them via indirect handlers or download endpoints
  • Normalizing and sanitizing filenames to remove dangerous extensions, paths, and metadata, and generating server-side random names
  • Applying content inspection (e.g., MIME-type checking, magic-byte validation) to detect mismatches between claimed type and actual content
  • Ensuring the web server and runtime configuration do not execute files from upload directories (e.g., disabling script execution there)
  • Applying least-privilege principles to the account handling file uploads, restricting filesystem access to the minimum required paths

How teams detect issues like this

To detect this class of vulnerability, organizations can:

  • Use static application security testing (SAST) to identify upload handlers that lack extension/type validation, store files under document roots, or omit security checks
  • Review code paths dealing with file uploads for the absence of allowlists, MIME validation, and safe storage patterns
  • Configure web application firewalls (WAFs) to alert on or block suspicious upload patterns, such as script extensions or mixed-content types
  • Monitor server logs for anomalous requests targeting uploaded files, unexpected execution of files in upload directories, or new script files appearing in the filesystem
  • Employ regular security testing and penetration testing focused on file upload endpoints to validate that uploaded content cannot be executed

Sources

SourceLink
github.comgithub.com/csprousers/csweb/commit/eba0b59a243390a1a4f9524cce6dbc0314bf0d91
github.comgithub.com/hx381/cspro-exploits
raw.githubusercontent.comraw.githubusercontent.com/cisagov/CSAF/develop/csaf_files/IT/white/2026/va-26-082-01.json
cve.orgcve.org/CVERecord?id=CVE-2025-60947

Frequently asked

questions

Yes. The vulnerability is accessible over the network through the CSWeb interface, but requires a valid authenticated user account with access to the file upload functionality.

The attacker must be authenticated and have permission to upload files, but they do not necessarily need administrative privileges. Any role that can access the vulnerable upload feature could potentially exploit it.

The safest pattern is to combine strict allowlist-based file type validation with safe storage: uploads should be validated server-side by type and content, stored outside of executable and web-accessible paths, and served only through controlled handlers that never execute uploaded content.

Adopt a standard secure upload design: treat all uploads as untrusted data, define a constrained set of allowed file types, validate both extension and content, isolate uploads from execution contexts, enforce least-privilege filesystem permissions, and incorporate these checks into coding guidelines and automated security testing.

Find out what's already
exploitable in your codebase.