Vulnerabilities in pkg:npm/mailparser

PACKAGE
Advisory Identifier: GHSA-7gmj-h9xc-mcxc
Advisory Summary

CVE-2026-3455 is a LOW (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Mailparser libraries in the npm ecosystem. The issue involves mailparser vulnerable to cross-site scripting. Remediation is available by upgrading affected packages to version 3.9.3.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/mailparser

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/mailparser. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-7gmj-h9xc-mcxc CVE-2026-3455 LOW mailparser vulnerable to Cross-site Scripting

CVE-2026-3455 at a Glance

CVE Identifier CVE-2026-3455
GHSA Identifier GHSA-7gmj-h9xc-mcxc
Severity LOW
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Mailparser
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-3455

To remediate this vulnerability, upgrade all affected Mailparser dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mailparser fixed: 3.9.3
npm install mailparser@3.9.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls mailparser

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-3455, inspect your project dependencies using npm:

npm ls mailparser

Analyze the terminal output to locate any version of Mailparser in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.9.3), your application is affected.

Note: The npm ls mailparser command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Mailparser, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Versions of the package mailparser before 3.9.3 are vulnerable to Cross-site Scripting (XSS) via the textToHtml() function due to the improper sanitisation of URLs in the email content. An attacker can execute arbitrary scripts in victim browsers by adding extra quote " to the URL with embedded malicious JavaScript code.

CVE-2026-3455 Affected Mailparser Versions

1 component(s)
Fixed Versions:
3.9.3
Product / Package Ecosystem Affected Versions Fixed Version
mailparser
npm
< 3.9.3
3.9.3

References

Frequently Asked Questions

What is CVE-2026-3455?
CVE-2026-3455 is a security vulnerability in Mailparser involving mailparser vulnerable to Cross-site Scripting under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Mailparser versions are affected?
Affected versions include releases prior to 3.9.3 across affected packages: mailparser.
What version fixes CVE-2026-3455?
Upgrading to 3.9.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mailparser affected?
Yes, mailparser is affected in releases prior to 3.9.3. Upgrade your dependency to 3.9.3 or later.
What is the CVSS score of CVE-2026-3455?
CVE-2026-3455 has a CVSS v3.1 base score of 6.1 (LOW) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-3455?
CVE-2026-3455 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check npm dependencies for CVE-2026-3455?
Run the dependency tree command: 'npm ls mailparser'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7gmj-h9xc-mcxc",
  "modified" : "2026-03-04T20:15:58Z",
  "published" : "2026-03-03T06:31:14Z",
  "aliases" : [ "CVE-2026-3455" ],
  "summary" : "mailparser vulnerable to Cross-site Scripting",
  "details" : "Versions of the package mailparser before 3.9.3 are vulnerable to Cross-site Scripting (XSS) via the textToHtml() function due to the improper sanitisation of URLs in the email content. An attacker can execute arbitrary scripts in victim browsers by adding extra quote  \" to the URL with embedded malicious JavaScript code.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:L/VA:N/SC:L/SI:L/SA:N/E:P"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "mailparser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.9.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-3455"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nodemailer/mailparser/issues/412"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nodemailer/mailparser/commit/921a67df4cfb38f0b411037d7b26fbd4d5411b08"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/hayageek/7fcb225e3b1ea9a341d560403fbb585a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nodemailer/mailparser"
  }, {
    "type" : "WEB",
    "url" : "https://security.snyk.io/vuln/SNYK-JS-MAILPARSER-15204032"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-04T20:15:58Z",
    "nvd_published_at" : "2026-03-03T05:17:25Z"
  }
}