CVE-2025-67898: Mjml Path Traversal Vulnerability

MODERATE
Advisory Identifier: GHSA-45h5-66jx-r2wf
CVSS 4.5
CWE-36
Published
Advisory Summary

CVE-2025-67898 is a MODERATE (CVSS 4.5) path traversal vulnerability (CWE-36: Absolute Path Traversal) affecting Mjml libraries in the npm ecosystem. The issue involves mjml allows mj-include directory traversal due to an incomplete fix for cve-2020-12827. Remediation is available by upgrading affected packages to version 5.0.0-alpha.9.

CVE-2025-67898 at a Glance

CVE Identifier CVE-2025-67898
GHSA Identifier GHSA-45h5-66jx-r2wf
Severity MODERATE
CVSS v3.1 Base Score 4.5
CWE Classification CWE-36: Absolute Path Traversal
Affected Product Mjml
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 4.5

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

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

How to Fix CVE-2025-67898

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

mjml fixed: 5.0.0-alpha.9
npm install mjml@5.0.0-alpha.9
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 mjml

How to Check if You Are Affected

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

npm ls mjml

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

Note: The npm ls mjml 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-36: Absolute Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize absolute path sequences such as "/abs/path" that can resolve to a location that is outside of that directory. In Mjml, 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

MJML before 5.0.0-alpha.9 allows mj-include directory traversal to test file existence and (in the type="css" case) read files. NOTE: this issue exists because of an incomplete fix for CVE-2020-12827.

CVE-2025-67898 Affected Mjml Versions

1 component(s)
Fixed Versions:
5.0.0-alpha.9
Product / Package Ecosystem Affected Versions Fixed Version
mjml
npm
< 5.0.0-alpha.9
5.0.0-alpha.9

References

Frequently Asked Questions

What is CVE-2025-67898?
CVE-2025-67898 is a security vulnerability in Mjml involving MJML allows mj-include directory traversal due to an incomplete fix for CVE-2020-12827 under CWE-36: Absolute Path Traversal.
Which Mjml versions are affected?
Affected versions include releases prior to 5.0.0-alpha.9 across affected packages: mjml.
What version fixes CVE-2025-67898?
Upgrading to 5.0.0-alpha.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mjml affected?
Yes, mjml is affected in releases prior to 5.0.0-alpha.9. Upgrade your dependency to 5.0.0-alpha.9 or later.
What is the CVSS score of CVE-2025-67898?
CVE-2025-67898 has a CVSS v3.1 base score of 4.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:L.
What CWE is associated with CVE-2025-67898?
CVE-2025-67898 is classified under CWE-36: Absolute Path Traversal (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize absolute path sequences such as "/abs/path" that can resolve to a location that is outside of that directory.).
How can I check npm dependencies for CVE-2025-67898?
Run the dependency tree command: 'npm ls mjml'. 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-45h5-66jx-r2wf",
  "modified" : "2026-06-26T20:28:42Z",
  "published" : "2025-12-15T00:30:25Z",
  "aliases" : [ "CVE-2025-67898" ],
  "summary" : "MJML allows mj-include directory traversal due to an incomplete fix for CVE-2020-12827",
  "details" : "MJML before 5.0.0-alpha.9 allows mj-include directory traversal to test file existence and (in the type=\"css\" case) read files. NOTE: this issue exists because of an incomplete fix for CVE-2020-12827.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "mjml"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.0.0-alpha.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-12827"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-67898"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mjmlio/mjml/issues/3018"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mjmlio/mjml/pull/3033"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mjmlio/mjml/commit/517b376b068e71c713ec4bb4ef9e5b0b7235b8ce"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mjmlio/mjml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-36" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-12-17T18:12:02Z",
    "nvd_published_at" : "2025-12-14T22:15:36Z"
  }
}