Vulnerabilities in pkg:npm/messageformat

PACKAGE
Advisory Identifier: GHSA-xfqm-j7pc-xrfc
Advisory Summary

CVE-2025-57349 is a LOW messageformat has a prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Messageformat libraries in the npm ecosystem. The issue involves messageformat has a prototype pollution vulnerability. Remediation is available by upgrading affected packages to version 3.0.0-beta.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/messageformat

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-xfqm-j7pc-xrfc CVE-2025-57349 LOW messageformat has a prototype pollution vulnerability

CVE-2025-57349 at a Glance

CVE Identifier CVE-2025-57349
GHSA Identifier GHSA-xfqm-j7pc-xrfc
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Messageformat
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2025-57349

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

messageformat fixed: 3.0.0-beta.0
npm install messageformat@3.0.0-beta.0
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 messageformat

How to Check if You Are Affected

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

npm ls messageformat

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

Note: The npm ls messageformat 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-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Messageformat, 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

The messageformat package, an implementation of the Unicode MessageFormat 2 specification for JavaScript, is vulnerable to prototype pollution due to improper handling of message key paths in versions prior to 2.3.0. The flaw arises when processing nested message keys containing special characters (e.g., __proto__ ), which can lead to unintended modification of the JavaScript Object prototype. This vulnerability may allow a remote attacker to inject properties into the global object prototype via specially crafted message input, potentially causing denial of service or other undefined behaviors in applications using the affected component.

CVE-2025-57349 Affected Messageformat Versions

1 component(s)
Fixed Versions:
3.0.0-beta.0
Product / Package Ecosystem Affected Versions Fixed Version
messageformat
npm
< 3.0.0-beta.0
3.0.0-beta.0

References

Frequently Asked Questions

What is CVE-2025-57349?
CVE-2025-57349 is a security vulnerability in Messageformat involving messageformat has a prototype pollution vulnerability under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Messageformat versions are affected?
Affected versions include releases prior to 3.0.0-beta.0 across affected packages: messageformat.
What version fixes CVE-2025-57349?
Upgrading to 3.0.0-beta.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is messageformat affected?
Yes, messageformat is affected in releases prior to 3.0.0-beta.0. Upgrade your dependency to 3.0.0-beta.0 or later.
What CWE is associated with CVE-2025-57349?
CVE-2025-57349 is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check npm dependencies for CVE-2025-57349?
Run the dependency tree command: 'npm ls messageformat'. 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-xfqm-j7pc-xrfc",
  "modified" : "2025-09-25T16:46:42Z",
  "published" : "2025-09-24T21:30:37Z",
  "aliases" : [ "CVE-2025-57349" ],
  "summary" : "messageformat has a prototype pollution vulnerability",
  "details" : "The messageformat package, an implementation of the Unicode MessageFormat 2 specification for JavaScript, is vulnerable to prototype pollution due to improper handling of message key paths in versions prior to 2.3.0. The flaw arises when processing nested message keys containing special characters (e.g., __proto__ ), which can lead to unintended modification of the JavaScript Object prototype. This vulnerability may allow a remote attacker to inject properties into the global object prototype via specially crafted message input, potentially causing denial of service or other undefined behaviors in applications using the affected component.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "messageformat"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.0-beta.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 2.3.0"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-57349"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/messageformat/messageformat/issues/452"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/messageformat/messageformat"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-25T16:46:42Z",
    "nvd_published_at" : "2025-09-24T19:15:40Z"
  }
}