Feb 18, 2026·5 min read·13 visits
Freeform <= 4.1.29 uses a version of Axios vulnerable to Uncontrolled Resource Consumption (CVE-2025-58754). Attackers can send a massive `data:` URI (e.g., 2GB of base64) which Axios attempts to load entirely into RAM, causing a fatal crash. Fix: Update to 4.1.30.
Solspace Freeform, a popular form-building plugin for Craft CMS, suffers from a Denial of Service (DoS) vulnerability due to an insecure implementation of the Axios HTTP client. By submitting a crafted 'data:' URI to an endpoint that processes external URLs, an attacker can trigger a synchronous decoding process that exhausts the Node.js heap memory, crashing the application process instantly.
Modern web development is like building a skyscraper out of LEGO bricks you found on the sidewalk. You grab a framework (Craft CMS), slap on a plugin (Solspace Freeform), and assume the structural integrity holds. But deep inside the dependency tree of that plugin lives axios—the ubiquitous HTTP client that powers half the internet.
Here is the catch: Solspace Freeform relies on Axios to handle external integrations and URL fetching. In versions prior to 4.1.30, it pinned a version of Axios that treats data: URIs like a trusted friend rather than a hostile input. This vulnerability isn't a complex buffer overflow in C; it's a logic flaw in how JavaScript handles memory allocation for massive strings.
When a Node.js application attempts to process a string larger than its heap limit (usually around 2GB on 64-bit systems, but effectively less depending on fragmentation), the V8 engine doesn't just throw an error and move on. It panics. It throws a fatal ERR_STRING_TOO_LONG or Heap out of memory error and kills the entire process. If you are running a single-threaded Node instance, your site just went dark.
The root cause lies upstream in Axios (CVE-2025-58754). Most developers think of Axios as a tool for making network requests—sending bytes over a wire. However, Axios also supports the data: scheme (RFC 2397), which allows you to embed small files directly inline.
The problem is that the vulnerable version of the Axios http adapter treats data: URIs differently than network streams. Instead of streaming the data or checking its length against a configured maxContentLength, it synchronously decodes the entire payload into a Buffer before doing anything else.
Imagine you tell a bouncer (Axios), "Only let people in if they weigh less than 200lbs." But the bouncer's logic for data: URIs was: "Let the person in, put them on a scale inside the club, and then check." If the person weighs 4,000lbs, the floor collapses before the scale is even read. By the time Axios realizes the payload is too big, the memory has already been allocated, and the Node process has already crashed.
Let's look at the fix in Axios which Solspace pulled in. The issue was that the length check happened after the decoding. The fix introduces a predictive check using estimateDataURLDecodedBytes.
Here is the logic flow in the vulnerable versions:
// OLD (Vulnerable) Logic Concept
if (protocol === 'data:') {
// 1. Parse the massive string immediately
// 2. Allocate a Buffer for the whole thing
const data = parseDataURI(config.url);
// 3. CRASH happens here during allocation, before any length check
}And here is the patch implemented in Axios (commit 945435fc51467303768202250debb8d4ae892593) which saves the day:
// NEW (Patched) Logic
if (protocol === 'data:') {
if (config.maxContentLength > -1) {
// Check the size BEFORE allocation
const estimated = estimateDataURLDecodedBytes(dataUrl);
if (estimated > config.maxContentLength) {
// Reject gracefully
return reject(new AxiosError(
'maxContentLength exceeded',
AxiosError.ERR_BAD_RESPONSE
));
}
}
}Solspace Freeform patched this by bumping their dependency requirements in commit e7402a1d1ce9f28ecb6ce659885ac66391d3a040. If you look at the composer.lock or package.json diffs, you won't see code changes in Freeform itself—just the silent upgrade of the underlying library that was holding the knife.
Exploiting this does not require shellcode or complex ROP chains. It requires the ability to copy and paste. The attacker needs to find any input field or API parameter in Freeform that is passed to Axios as a URL.
Once the input vector is identified (e.g., a webhook URL configuration or a form field that fetches external resources), the attacker generates a payload:
data:text/plain;base64,A) repeated enough times to exceed the server's available heap.# Conceptual Exploit Generation
# Generate 2GB of 'A's
PAYLOAD="data:text/plain;base64,$(python3 -c "print('A' * 1024 * 1024 * 2048)")"
# Send to vulnerable endpoint
curl -X POST https://target-craft-site.com/actions/freeform/some-endpoint \
-d "target_url=$PAYLOAD"Upon receipt, the server receives the POST request (which Nginx/Apache might accept if the body limit isn't huge, but the data: URI is often processed internally). If the URI string is passed to Axios, the Event Loop halts while it tries to allocate 2GB of RAM. The process dies. If the process is managed by a supervisor (like PM2), it restarts, but a persistent attacker can simply loop the request, keeping the service permanently offline.
This is a classic Denial of Service, but with high reliability. Unlike network floods that require bandwidth, this attack is asymmetrical. A single HTTP request with a long string string triggers a resource exhaustion event on the server.
For Craft CMS sites running Freeform, this usually means the PHP process (if Axios is invoked via a Node sidecar) or the Node service itself crashes. In containerized environments (Docker/Kubernetes), this OOM event will kill the pod. If the attack is sustained, it leads to CrashLoopBackOff, rendering the site accessible.
Furthermore, because this exploits the JavaScript heap limit, it bypasses many standard network-layer DDoS protections. A WAF might see a long string, but unless it is specifically configured to block data: schemes in POST bodies, it looks like just another piece of user input.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
Solspace Freeform Solspace | <= 4.1.29 | 4.1.30 |
Axios Axios | 0.28.0 - 0.30.2, 1.0.0 - 1.12.0 | 1.12.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-770 |
| Attack Vector | Network |
| CVSS Score | 7.5 (High) |
| Impact | Denial of Service (OOM) |
| Root Cause | Unbounded Resource Allocation |
| Exploit Status | PoC Available |
Allocation of Resources Without Limits or Throttling