CVE-2023-52079: Msgpackr Msgpackr's Conversion Of Property Names Vulnerability

HIGH
Advisory Identifier: GHSA-7hpj-7hhx-2fgx
CVSS 8.6
CWE-674
Published
Advisory Summary

CVE-2023-52079 is a HIGH (CVSS 8.6) msgpackr's conversion of property names vulnerability (CWE-674: Uncontrolled Recursion) affecting Msgpackr libraries in the npm ecosystem. The issue involves msgpackr's conversion of property names to strings can trigger infinite recursion. Remediation is available by upgrading affected packages to version 1.10.1.

CVE-2023-52079 at a Glance

CVE Identifier CVE-2023-52079
GHSA Identifier GHSA-7hpj-7hhx-2fgx
Severity HIGH
CVSS v3.1 Base Score 8.6
CWE Classification CWE-674: Uncontrolled Recursion
Affected Product Msgpackr
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.6

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

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

How to Fix CVE-2023-52079

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

msgpackr fixed: 1.10.1
npm install msgpackr@1.10.1
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 msgpackr

How to Check if You Are Affected

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

npm ls msgpackr

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

Note: The npm ls msgpackr 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-674: Uncontrolled Recursion, where the product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack. In Msgpackr, 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

### Impact When decoding user supplied MessagePack messages, users can trigger stuck threads by crafting messages that keep the decoder stuck in a loop. ### Patches The fix is available in v1.10.1 ### Workarounds Exploits seem to require structured cloning, replacing the 0x70 extension with your own (that throws an error or does something other than recursive referencing) should mitigate the issue. ### References

CVE-2023-52079 Affected Msgpackr Versions

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

References

Frequently Asked Questions

What is CVE-2023-52079?
CVE-2023-52079 is a security vulnerability in Msgpackr involving msgpackr's conversion of property names to strings can trigger infinite recursion under CWE-674: Uncontrolled Recursion.
Which Msgpackr versions are affected?
Affected versions include releases prior to 1.10.1 across affected packages: msgpackr.
What version fixes CVE-2023-52079?
Upgrading to 1.10.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is msgpackr affected?
Yes, msgpackr is affected in releases prior to 1.10.1. Upgrade your dependency to 1.10.1 or later.
What is the CVSS score of CVE-2023-52079?
CVE-2023-52079 has a CVSS v3.1 base score of 8.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:H.
What CWE is associated with CVE-2023-52079?
CVE-2023-52079 is classified under CWE-674: Uncontrolled Recursion (The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.).
How can I check npm dependencies for CVE-2023-52079?
Run the dependency tree command: 'npm ls msgpackr'. 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-7hpj-7hhx-2fgx",
  "modified" : "2024-01-10T18:34:21Z",
  "published" : "2023-12-28T21:16:20Z",
  "aliases" : [ "CVE-2023-52079" ],
  "summary" : "msgpackr's conversion of property names to strings can trigger infinite recursion",
  "details" : "### Impact\nWhen decoding user supplied MessagePack messages, users can trigger stuck threads by crafting messages that keep the decoder stuck in a loop.\n\n### Patches\nThe fix is available in v1.10.1\n\n### Workarounds\nExploits seem to require structured cloning, replacing the 0x70 extension with your own (that throws an error or does something other than recursive referencing) should mitigate the issue.\n\n### References",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "msgpackr"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.10.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/kriszyp/msgpackr/security/advisories/GHSA-7hpj-7hhx-2fgx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-52079"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kriszyp/msgpackr/commit/18f44f8800e2261341cdf489d1ba1e35a0133602"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kriszyp/msgpackr"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-674" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-28T21:16:20Z",
    "nvd_published_at" : "2023-12-28T16:16:01Z"
  }
}