CVE-2024-27448: Maildev Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-vc6q-ccj9-9r89
CVSS 9.8
CWE-352 CWE-22
Published
Advisory Summary

CVE-2024-27448 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Maildev libraries in the npm ecosystem. The issue involves maildev remote code execution. Remediation is available in the latest vendor maintenance releases.

CVE-2024-27448 at a Glance

CVE Identifier CVE-2024-27448
GHSA Identifier GHSA-vc6q-ccj9-9r89
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-352: Cross-Site Request Forgery (CSRF)
Affected Product Maildev
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.8

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:N/S:U/C:H/I:H/A:H).

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

How to Fix CVE-2024-27448

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

maildev fixed: Latest secure release
npm install maildev@Latest secure release
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 maildev

How to Check if You Are Affected

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

npm ls maildev

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

Note: The npm ls maildev 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-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. In Maildev, 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

MailDev 2 through 2.1.0 allows Remote Code Execution via a crafted Content-ID header for an e-mail attachment, leading to `lib/mailserver.js` writing arbitrary code into the `routes.js` file.

CVE-2024-27448 Affected Maildev Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
maildev
npm
≥ 2.0.0-beta1
≤ 2.1.0

References

Frequently Asked Questions

What is CVE-2024-27448?
CVE-2024-27448 is a security vulnerability in Maildev involving MailDev Remote Code Execution under CWE-352: Cross-Site Request Forgery (CSRF).
Which Maildev versions are affected?
Affected versions include releases prior to current release patches across affected packages: maildev.
What version fixes CVE-2024-27448?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is maildev affected?
Yes, maildev is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2024-27448?
CVE-2024-27448 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-27448?
CVE-2024-27448 is classified under CWE-352: Cross-Site Request Forgery (CSRF) (The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.).
How can I check npm dependencies for CVE-2024-27448?
Run the dependency tree command: 'npm ls maildev'. 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-vc6q-ccj9-9r89",
  "modified" : "2025-03-14T19:53:02Z",
  "published" : "2024-04-05T06:30:46Z",
  "aliases" : [ "CVE-2024-27448" ],
  "summary" : "MailDev Remote Code Execution",
  "details" : "MailDev 2 through 2.1.0 allows Remote Code Execution via a crafted Content-ID header for an e-mail attachment, leading to `lib/mailserver.js` writing arbitrary code into the `routes.js` file.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "maildev"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0-beta1"
      }, {
        "last_affected" : "2.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-27448"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/maildev/maildev/issues/467"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/stypr/fe2003f00959f7e3d92ab9d5260433f8"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Tim-Hoekstra/MailDev-2.1.0-Exploit-RCE"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/maildev/maildev"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/maildev/maildev/releases"
  }, {
    "type" : "WEB",
    "url" : "https://intrix.com.au/articles/exposing-major-security-flaw-in-maildev"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-352" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-05T17:03:37Z",
    "nvd_published_at" : "2024-04-05T06:15:10Z"
  }
}