Advisories for Npm/Uploadfs package

2026

ApostropheCMS: Path traversal in uploadfs

The uploadfs library's local storage backend does not validate or sanitize user-supplied paths. The prefixPath() helper only strips double slashes (//) and the backend performs direct string concatenation (uploadsPath + path). An attacker can inject ../ sequences to escape the intended uploads directory, resulting in arbitrary file read, write, and delete on the host filesystem.

ApostropheCMS uploadfs Azure backend leaks account-level SAS token into every public attachment URL (sas: true)

When uploadfs is configured with the Azure backend and sas: true (a supported configuration introduced in uploadfs 1.25.0), createContainer() builds the BlobServiceClient from a URL that embeds the full SAS query string, and Azure SDK v12 derived clients inherit that query string. As a result, getUrl() returns a base URL carrying the complete account/container SAS signature (?sv=…&sig=…), and Apostrophe's attachment.url() prepends it to every public attachment link — broadcasting a …