Path traversal in FilesUploadFeature allows writes outside the filesystem upload root
Description
A path traversal vulnerability in FilesUploadFeature combined with FileSystemVirtualFiles allows an attacker who can upload files to create or overwrite files outside the configured filesystem upload root, subject to the application's operating-system write permissions.
The default upload resolver incorporates the client-supplied multipart filename into the destination path. Filesystem writes did not enforce containment within the virtual-file root. The upload path also normalizes backslashes into forward slashes, allowing backslash-based traversal on Unix systems.
Impact and prerequisites
The application must expose an affected upload endpoint backed by FileSystemVirtualFiles. With the default UploadLocation.WriteAccessRole, any authenticated user can upload without an additional role. Applications explicitly configured with AllowAnon can expose the issue to unauthenticated users. Deployments restricting uploads to a trusted role have a narrower attacker population.
An attacker can choose file contents and traverse outside the upload root to create or overwrite files the application process can write. Consequences can include application configuration or data corruption, cross-tenant integrity loss, and service disruption. Stored active content or code execution may be possible in particular deployments where writable locations are served or loaded as executable content; code execution is not established as an unconditional consequence.
The underlying filesystem provider also lacked containment checks on synchronous writes, appends, file deletion, and recursive folder deletion. Exploitability of those operations depends on an application passing attacker-controlled paths to them; the reported upload route demonstrates file creation and overwrite.
Affected packages and versions
ServiceStack: theFilesUploadFeatureupload path.ServiceStack.Common: filesystem virtual-file path containment.
The report reproduced the issue at commit f2adcc766e775f2dbed3de2b3d04a5129b2549e3. Maintainer review also confirmed the vulnerable resolver and filesystem write code in the v10.4 release source (package version 10.4.0).
The full affected released-version range remains under investigation. The structured affected-version fields are intentionally incomplete in this private draft; determine them before publication. Do not infer that unlisted earlier releases are unaffected.
Patched builds
The fix is in commit 0e93434304c111028030e8672f1f085fa5e0db93 and is available in the 10.4.1 pre-release-feed packages for ServiceStack and ServiceStack.Common.
Both packages retrieved from the pre-release feed on 17 October 2026 identify that fix commit in their NuGet repository metadata. The pre-release publishing workflow for the fix completed successfully: publication run.
Earlier pre-release builds also used version 10.4.1. Obtain the refreshed packages containing the fix commit; a previously cached 10.4.1 package may predate the fix. Refresh cached copies of both affected packages, restore from the updated pre-release feed, and rebuild/redeploy. The structured patched version refers to these refreshed builds. Verify stable-release availability separately before adding stable-release upgrade guidance.
The patch validates original/transformed upload filenames and resolved upload, download, replacement, and deletion paths; centralizes filesystem containment; uses platform-appropriate path casing; and rejects symbolic links below the configured filesystem root. Applications relying on path-bearing upload filenames or links below their virtual-file roots need to adjust those usages. The configured root itself may be a trusted symbolic link. Filesystem link checks assume untrusted local processes cannot replace directory entries concurrently.
Workarounds
Until patched packages are deployed, disable affected uploads or implement server-side validation that rejects filenames containing either separator and enforces containment of the final resolved destination. Apply equivalent validation to any custom path resolver. Restricting upload access to trusted users and limiting filesystem write permissions can reduce exposure; an extension allowlist alone does not prevent traversal.
Credit
Reported by Mohammed alquraini and the Humain Guardian Team. Confirm preferred public attribution with the reporter before publication.
Maintainer checklist before publication
- Establish the full affected package-version ranges and populate the structured fields.
- Review the proposed High severity; no final CVSS vector has been assigned.
- Verify fixed-build availability and the cache-refresh guidance; distinguish pre-release and stable distribution.
- Coordinate publication and credit with the reporter.
- Decide whether to request a CVE. No CVE has been requested for this draft.