Oct 6, 2026·6 min read·18 visits
Unauthenticated remote attackers can freeze the Payload CMS Node.js event loop and exhaust heap memory by sending malformed multipart HTTP requests, exploiting a ReDoS flaw in the boundary regex parser and a lack of request size limits in stream processing.
Payload CMS, a popular open-source headless Content Management System, contains a critical Regular Expression Denial of Service (ReDoS) and uncontrolled resource consumption vulnerability in versions prior to 3.90.0 and canary versions prior to 4.0.0-canary.34. Due to nested quantifiers in the multipart boundary regex validation pattern, and the absence of streaming backpressure controls, remote attackers can trigger catastrophic backtracking and memory exhaustion. This blocks the single-threaded Node.js event loop, resulting in a persistent and complete Denial of Service (DoS).
Payload CMS uses multipart request processing to facilitate file uploads and complex object parsing. The application exposes specific endpoints (such as /api/media and registration routes) that allow unauthenticated clients to transmit multipart payloads.
In vulnerable versions of Payload CMS, the initial validation logic evaluates the Content-Type header using an inefficient regular expression designed to confirm the presence of valid multipart parameters. If the header pattern deviates slightly from the expected format at the termination of the string, the underlying Javascript V8 engine falls into catastrophic backtracking.
Simultaneously, the secondary processing stage utilizes an unbounded stream parser that feeds incoming data directly into Busboy. The implementation lacks global size limits and fails to process socket events with proper backpressure. This omission enables concurrent attackers to consume substantial system memory, resulting in process termination or starvation of system resources.
The root cause of the vulnerability resides in two separate software components. First, in isEligibleRequest.ts, a regular expression is executed to parse the client-supplied Content-Type header. The vulnerable regex pattern is defined as:
const ACCEPTABLE_CONTENT_TYPE =
/multipart\/[\w'"()+,./:<=>?@[\\\]^-]+(?:; ?[\w'"()+,./:<=>?@[\\\]^-]*)+$/iThe pattern uses a nested quantifier sequence inside the non-capturing group (?:; ?[\w'"()+,./:<=>?@[\\\]^-]*)+$. Because the inner character class is quantified with * (zero or more matches) and the outer group is quantified with + (one or more matches), a string containing multiple nested semicolons and spaces (for example, ; ; ; ; ;) can be split and evaluated in an exponential number of ways by the engine.
When a remote client supplies a string containing thousands of trailing semicolons followed by an invalid character such as {, the V8 regular expression engine spends exponential time backtracking to try every possible path permutation. Because the Node.js event loop runs on a single execution thread, the catastrophic backtracking block locks the execution context, preventing the application from serving other requests.
Additionally, the multipart parsing routine in processMultipart.ts lacked backpressure handling and overall boundary checks. The logic read from the stream reader inside a standard while loop, invoking busboy.write() synchronously. This pattern ignores the write buffer state, meaning slow clients or extremely large requests can force the application to buffer infinite amounts of data directly in heap memory, causing Out-Of-Memory (OOM) crashes.
In the vulnerable version of the codebase, the stream consumption loop handled chunks without awaiting the write state of the consumer. This allowed the node buffer space to grow unrestricted. Below is the vulnerable stream processing code:
// packages/payload/src/uploads/fetchAPI-multipart/processMultipart.ts
while (parsingRequest) {
const { done, value } = await reader!.read()
if (done) {
parsingRequest = false
busboy.end()
}
if (value && !shouldAbortProccessing) {
// Synchronous write ignores backpressure constraints
busboy.write(value)
}
}In contrast, the patched implementation defines a default maximum request limit (DEFAULT_REQUEST_SIZE_LIMIT) of 50 MiB and wraps the write operations in an asynchronous pump() function. The new logic respects write callbacks and dynamically calculates the current incoming byte length against the configured limit:
// Patched version of processMultipart.ts
const pump = async () => {
try {
while (!failure) {
const { done, value } = await reader.read()
if (failure) {
break
}
if (done) {
busboy.end()
break
}
requestSize += value.byteLength
if (requestSize > requestSizeLimit) {
const err = requestSizeLimitError()
fail(err)
// Terminate and cancel the stream to stop data flow
await reader.cancel(err).catch(() => {})
break
}
// Await callback of busboy.write to ensure backpressure is resolved
await new Promise<void>((resolve, reject) => {
busboy.write(value, (err?: Error | null) => (err ? reject(err) : resolve()))
})
}
} finally {
reader.releaseLock()
}
}This safe fail-closed structure forces immediate stream destruction when the bytes exceed limits, saving both process memory and thread CPU time.
An attacker can exploit this vulnerability without authenticating to the target Payload CMS instance. The attack consists of formulating a crafted HTTP request with a malformed header designed to trigger catastrophic backtracking. Below is the sequence of events during a typical attack vector:
To exploit the ReDoS flaw, an attacker sends an HTTP header resembling the following:
Content-Type: multipart/form-data; boundary=bar; a=1; a=1; a=1; [repeated 4000 times] {The trailing curly brace { prevents the regular expression from matching successfully. The engine is then forced to evaluate every subset permutation of the repeated parameter assignments, consuming 100 percent of the host CPU core.
To exploit the uncontrolled stream processing, the attacker starts writing an endless stream of dummy bytes inside the body of a valid multipart payload. If the application server fails to enforce rate limiting or reverse proxy timeouts, the Payload Node process buffers the stream data globally on the heap, triggering a process crash due to memory exhaustion.
The absolute resolution is to upgrade the application dependency to an official patched release. For environments operating on the major 3.x branch, upgrade to 3.90.0 or higher. For canary development tracks, upgrade to 4.0.0-canary.34 or later.
In cases where immediate package upgrade is not feasible, organizations can enforce mitigations at the edge or ingress proxy layer. Configure the Web Application Firewall (WAF) or ingress controller to filter incoming HTTP request headers. Establish a ceiling constraint on the maximum length of the Content-Type header (for example, limiting it to 256 bytes). Legitimate boundary strings rarely exceed this limit.
Additionally, implement request payload body limitations at the reverse proxy layer (such as Nginx's client_max_body_size directive). This ensures that large streaming uploads are dropped prior to being processed by the downstream Node.js service, preventing stream exhaustion vectors.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
payload payloadcms | >= 3.0.0, < 3.90.0 | 3.90.0 |
payload payloadcms | >= 4.0.0-canary.0, < 4.0.0-canary.34 | 4.0.0-canary.34 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-1333, CWE-400 |
| Attack Vector | Network |
| CVSS Score | 8.7 (High) |
| Exploit Status | poc |
| KEV Status | not-listed |
| Remediation Status | patched |
Inefficient Regular Expression Complexity (ReDoS) leading to CPU starvation, coupled with Uncontrolled Resource Consumption (memory heap exhaustion) due to missing backpressure controls in stream parsing.
A critical path traversal vulnerability caused by improper input validation (CWE-20) exists in the direct image download handler of Canonical LXD and Linux Containers Incus. When an authenticated user requests an image import using the URL source type, the daemon reads the image fingerprint from an untrusted HTTP response header (`Incus-Image-Hash` or `LXD-Image-Hash`) without validating that it conforms to a SHA-256 format. This unvalidated string is concatenated directly into a filesystem path via `filepath.Join` prior to file creation and cryptographic verification, allowing directory traversal sequences to write arbitrary files on the host filesystem as root.
CVE-2026-9639 (GHSA-j93m-3j9p-m5m8) is a null pointer dereference vulnerability in Canonical LXD affecting versions 5.0.0 through 5.21.4 and 6.0 through 6.8. The flaw resides in the (*lxdBackend).CreateCustomVolumeFromBackup method within lxd/storage/backend_lxd.go. An authenticated attacker with the can_create_storage_volumes permission can upload a crafted custom volume backup tarball that omits the expires_at field on a snapshot entry, triggering an unhandled SIGSEGV panic and terminating the LXD daemon.
An operating system command injection vulnerability (CWE-78) exists in GeoNode versions prior to 5.1.0. The vulnerability occurs in the vector upload processing pipeline when handling user-supplied geospatial files. By supplying a crafted layer name containing shell metacharacters, an authenticated attacker with basic data upload privileges can execute arbitrary commands on the underlying server or container hosting the GeoNode application and Celery worker processes.
GeoNode versions prior to 5.0.3 contain an unrestricted file upload vulnerability (CWE-434) within the document and dataset ingestion architecture. Authenticated low-privileged users can bypass upload validation via direct REST API interactions, file extension masquerading, metadata mutation via PATCH requests, or malicious archive submissions. This allows attackers to store and serve dangerous file types, alter on-disk file references, or trigger path traversal and resource exhaustion during archive extraction.
CVE-2026-55649 is a stored Cross-Site Scripting (XSS) vulnerability in GeoNode versions prior to 5.0.3. The flaw exists because document abstract metadata fields are ingested via the metadata management pipeline and stored in the backend database without HTML sanitization or input neutralization. An authenticated attacker with privileges to create or edit document metadata can inject arbitrary HTML and JavaScript payloads into these fields. When another user, such as an administrator, views the affected document page or catalog listing, the unencoded payload is rendered into the Document Object Model (DOM) and executes within the victim's browser session.
CVE-2026-55622 (GHSA-qx75-2p3r-pwm5) is an improper access control vulnerability (CWE-284) in Canonical LXD and LXC Incus (tracked as GHSA-c9f5-j9c3-mhrg). In multi-tenant deployments utilizing project-based isolation, the REST API handler for instance creation via POST /1.0/instances verifies that the authenticated user has authorization in the destination project specified by the query parameter, but fails to verify whether the user holds read or view permissions for the source instance when executing a copy operation across projects. Consequently, an authenticated client restricted to a single project can clone instances or snapshots from unauthorized projects into their own project, resulting in complete disclosure of the target instance filesystem and embedded credentials.