CVE-2026-34752: Verified Repro With Script Download
CVE-2026-34752: Haraka Mail Server DoS via proto prototype pollution in email headers
CVE-2026-34752 is verified against npm/Haraka · github. Affected versions: < 3.1.4 (last known affected <= 3.1.3). Vulnerability class: DoS. This high reproduction includes runnable sandbox proof, artifacts, and a plain-text agent view under REPRO-2026-00128.
What Is CVE-2026-34752?
CVE-2026-34752 is a high-severity denial-of-service vulnerability in Haraka's bundled haraka-email-message library, where an email header named __proto__ triggers an uncaught exception that can crash the mail server. Pruva reproduced it (reproduction REPRO-2026-00128).
CVE-2026-34752 Severity & CVSS Score
CVE-2026-34752 is rated high severity, with a CVSS base score of 7.5 out of 10.
High — serious impact or readily exploitable. Prioritize remediation.
Affected npm/Haraka Versions
npm/Haraka · github versions < 3.1.4 (last known affected <= 3.1.3) are affected.
How to Reproduce CVE-2026-34752
pruva-verify REPRO-2026-00128 curl -O https://pruva.dev/api/v1/reproductions/REPRO-2026-00128/artifacts/reproduction_steps.sh && chmod +x reproduction_steps.sh && ./reproduction_steps.sh Proof of Reproduction for CVE-2026-34752
Reproduced by Pruva's autonomous agents — 155 tool calls over 17 min. Full root-cause analysis and the complete transcript are below.
How the agent worked
Root Cause and Exploit Chain for CVE-2026-34752
Summary
CVE-2026-34752 is a Denial of Service vulnerability in the haraka-email-message library (v1.2.0 and earlier). The vulnerability occurs in the Header.parse() method when processing email headers with the key __proto__. Due to unsafe property assignment using this.headers[key], accessing this.headers['__proto__'] returns Object.prototype instead of a normal array. This causes the subsequent this.headers[key][method](value) call (where method is "push") to fail with a TypeError, as Object.prototype.push is not a function. This uncaught exception can crash the entire application.
Impact
- Package: haraka-email-message
- Affected Versions: 1.2.0 and earlier (bundled with Haraka@3.1.3)
- Fixed Versions: 1.3.2 (latest as of March 2026)
- Risk Level: High
- Consequences:
- Application crash/DoS via prototype pollution
- Uncaught TypeError terminates Node.js process
- In Haraka SMTP server context: single-process mode causes full server crash, cluster mode kills worker processes
Root Cause
The vulnerability exists in lib/header.js (in v1.2.0 bundled in index.js) in the _add_header() function at lines 150-151:
_add_header (key, value, method) {
this.headers[key] = this.headers[key] || [];
this.headers[key][method](value);
}
When key is __proto__:
this.headers['__proto__']returnsObject.prototype(the object's prototype chain)Object.prototypeis truthy, so the|| []short-circuit is not executedthis.headers['__proto__']evaluates toObject.prototypeObject.prototype['push'](value)is called, butObject.prototype.pushisundefined/not a function- TypeError is thrown: "this.headers[key][method] is not a function"
The Header.parse() method calls _add_header(key, val, "push") for each header line parsed, making it the attack vector for converting malicious email documents into internal structures.
Fix: The patched version uses Object.create(null) for the headers object or validates/sanitizes header keys to prevent prototype pollution.
Reproduction Steps
The reproduction script repro/reproduction_steps.sh:
- Installs the vulnerable haraka-email-message@1.2.0 package
- Creates a Node.js harness that imports the library
- First tests normal headers to confirm baseline functionality
- Then tests malicious headers containing
__proto__: crash - Confirms the TypeError is thrown as expected
Execution:
./repro/reproduction_steps.sh
Expected Evidence:
- Normal headers parse successfully
- Malicious headers with
__proto__key cause TypeError: "this.headers[key][method] is not a function" - Crash evidence saved to
artifacts/crash_evidence.json
Evidence
Log Files:
logs/npm_install.log- Package installation loglogs/exploit.log- Exploit execution log showing the crash
Key Excerpt from exploit.log:
[+] Test 2: Parsing malicious headers with __proto__ key...
[+] This triggers the prototype pollution vulnerability in _add_header()
[+] CRASH CONFIRMED!
[+] Error type: TypeError
[+] Error message: this.headers[key][method] is not a function
[+] This matches the expected vulnerability behavior
Crash Evidence (artifacts/crash_evidence.json):
{
"vulnerability": "CVE-2026-34752",
"library": "haraka-email-message",
"version": "1.2.0",
"entrypoint": "Header.parse()",
"trigger": "__proto__ header key",
"error": {
"type": "TypeError",
"message": "this.headers[key][method] is not a function"
}
}
Environment:
- Node.js version: v18.x (from container)
- Library version: haraka-email-message@1.2.0
- OS: Linux (container environment)
Recommendations / Next Steps
Fix Approach:
- Use
Object.create(null)instead of{}for thethis.headersobject to create a prototype-less object - Sanitize all header keys to reject or escape
__proto__,constructor, andprototypekeys - Use a Map instead of plain objects for header storage
Upgrade Guidance:
- Upgrade to haraka-email-message@1.3.2 or later
- If using Haraka SMTP server, upgrade to v3.1.4 or later which includes the patched library
Testing Recommendations:
- Add unit tests for prototype pollution attempts in header parsing
- Test with malicious header keys:
__proto__,constructor,prototype - Implement input validation for all user-controlled data that becomes object keys
Additional Notes
Idempotency: The reproduction script is fully idempotent. It creates a fresh test directory /tmp/haraka_lib_test each run and cleans up after itself.
Edge Cases Tested:
- Normal email headers: Parse successfully
- Malicious
__proto__header: Confirmed crash
Limitations:
- The reproduction demonstrates the library-level vulnerability in isolation
- In a real Haraka SMTP server deployment, the exploit would require sending an actual email via SMTP with the malicious header
- The impact in production depends on process configuration (single vs cluster mode)
CVE-2026-34752 Reproduction Transcript
The agent's step-by-step process — every tool call, every handoff, the moment the exploit fired.
Full session Replay every step — scrub the timeline or play it back.
#!/bin/bash
set -euo pipefail
# CVE-2026-34752 - Haraka Mail Server DoS via prototype pollution reproduction script
ROOT="${PRUVA_ROOT:-$(cd "$(dirname "$0")/.." && pwd)}"
LOGS="$ROOT/logs"
ARTIFACTS="$ROOT/artifacts"
mkdir -p "$LOGS" "$ARTIFACTS"
cd "$ROOT"
echo "[+] Installing Haraka@3.1.3 (vulnerable version)..."
npm install -g Haraka@3.1.3 2>&1 | tee "$LOGS/npm_install.log"
echo "[+] Initializing Haraka configuration..."
rm -rf /tmp/haraka_test
mkdir -p /tmp/haraka_test
haraka -i /tmp/haraka_test 2>&1 | tee "$LOGS/haraka_init.log"
echo "[+] Starting Haraka server on port 2525..."#!/bin/bash
set -euo pipefail
# CVE-2026-34752 - Haraka Email Message Library DoS via prototype pollution
# This reproduces the vulnerability in haraka-email-message library's header parsing
ROOT="${PRUVA_ROOT:-$(cd "$(dirname "$0")/.." && pwd)}"
LOGS="$ROOT/logs"
ARTIFACTS="$ROOT/artifacts"
mkdir -p "$LOGS" "$ARTIFACTS"
cd "$ROOT"
echo "[+] Creating Node.js test project..."
mkdir -p /tmp/haraka_lib_test
cd /tmp/haraka_lib_test
# Initialize package.json if not exists
if [ ! -f package.json ]; then
npm init -y 2>&1 | tee "$LOGS/npm_init.log"
fiArtifacts and Evidence for CVE-2026-34752
Scripts, logs, diffs, and output captured during the reproduction.
No artifacts available
How to Fix CVE-2026-34752
FAQ: CVE-2026-34752
How does the __proto__ header DoS attack work?
Which versions are affected by CVE-2026-34752, and where is it fixed?
How severe is CVE-2026-34752?
How can I reproduce CVE-2026-34752?
References for CVE-2026-34752
Authoritative sources for CVE-2026-34752 — official vulnerability databases and the upstream advisory. Pruva's reproduction verifies the issue firsthand; these are the primary records to corroborate it.