Skip to content

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.

REPRO-2026-00128 npm/Haraka · github DoS Apr 4, 2026 CVE entry ↗ .txt
Severity
HIGH
CVSS
7.5
Reproduced in
17m 5s
Tool calls
155
01 · Overview

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).

02 · Severity & CVSS

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 threat level
7.5 / 10 CVSS base
Weakness CWE-248 Uncaught Exception

High — serious impact or readily exploitable. Prioritize remediation.

03 · Affected Versions

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
or curl -O https://pruva.dev/api/v1/reproductions/REPRO-2026-00128/artifacts/reproduction_steps.sh && chmod +x reproduction_steps.sh && ./reproduction_steps.sh
Run in a VM or disposable container. This exploits a real vulnerability.
06 · Proof of Reproduction

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 264 events · 155 tool calls · 17 min
17 minDuration
155Tool calls
100Reasoning steps
264Events
3Dead-ends
Agent activity over 17 min
Support
26
Repro
80
Judge
13
Variant
72
Coding
67
0:0017:05

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__:

  1. this.headers['__proto__'] returns Object.prototype (the object's prototype chain)
  2. Object.prototype is truthy, so the || [] short-circuit is not executed
  3. this.headers['__proto__'] evaluates to Object.prototype
  4. Object.prototype['push'](value) is called, but Object.prototype.push is undefined/not a function
  5. 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:

  1. Installs the vulnerable haraka-email-message@1.2.0 package
  2. Creates a Node.js harness that imports the library
  3. First tests normal headers to confirm baseline functionality
  4. Then tests malicious headers containing __proto__: crash
  5. 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 log
  • logs/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:

Recommendations / Next Steps

Fix Approach:

  1. Use Object.create(null) instead of {} for the this.headers object to create a prototype-less object
  2. Sanitize all header keys to reject or escape __proto__, constructor, and prototype keys
  3. 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:

  1. Add unit tests for prototype pollution attempts in header parsing
  2. Test with malicious header keys: __proto__, constructor, prototype
  3. 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.

Event 1/40
0:008:37
0:00
session startedgpt-4o · CVE-2026-34752 · 9b6913fe
0:09
0:12
0:28
0:30
web search
0:44
0:47
0:58
web search
1:01
1:53
web search
1:56
3:23
session startedgpt-4o · CVE-2026-34752 · 9b6913fe
3:37
web search
3:40
3:55
3:59
4:18
4:20
web search
4:23
4:39
web search
4:52
4:56
5:07
web search
5:09
5:13
6:01
extract_facts
no facts extracted
6:05
6:06
6:06
supportrepro
7:57
7:57
7:57
7:58
7:58
7:58
8:15
8:15
#!/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..."
8:37
8:37
#!/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"
fi

Artifacts and Evidence for CVE-2026-34752

Scripts, logs, diffs, and output captured during the reproduction.

No artifacts available

08 · How to Fix

How to Fix CVE-2026-34752

Coming soon

Step-by-step mitigation and hardening guidance for CVE-2026-34752 — configuration checks, workarounds where no patch exists, and how to verify you're protected — is on the way.

10 · FAQ

FAQ: CVE-2026-34752

How does the __proto__ header DoS attack work?

An attacker sends an email whose header key is literally __proto__. When Haraka's header parser calls _add_header('__proto__', value, 'push'), the unsafe this.headers[key] lookup returns Object.prototype instead of creating a new array, so calling .push on it throws an uncaught TypeError that crashes the Node.js process -- a full server crash in single-process mode, or a worker-process kill in cluster mode.

Which versions are affected by CVE-2026-34752, and where is it fixed?

The bundled haraka-email-message library at version 1.2.0 and earlier is affected (last known affected Haraka <= 3.1.3). It is fixed in haraka-email-message 1.3.2.

How severe is CVE-2026-34752?

High severity -- a crafted header value causes an uncaught exception that crashes the entire Haraka process in single-process mode, or kills worker processes in cluster mode, denying service to legitimate mail traffic.

How can I reproduce CVE-2026-34752?

Download the verified script from this page and run it in an isolated environment against a Haraka install bundling haraka-email-message 1.2.0 or earlier. It sends an email with a __proto__ header and shows the resulting uncaught TypeError crashing the server process.
11 · References

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.