GHSA-593m-55hh-j8gv: @sentry/browser Sentry SDK Prototype Pollution Gadget Vulnerability

MODERATE
CVSS 5.6
CWE-913
Published
Advisory Summary

GHSA-593m-55hh-j8gv is a MODERATE (CVSS 5.6) sentry sdk prototype pollution gadget vulnerability (CWE-913: Improper Control of Dynamically-Managed Code Resources) affecting @sentry/browser libraries in the npm ecosystem. The issue involves sentry sdk prototype pollution gadget in javascript sdks. Remediation is available by upgrading affected packages to version 8.33.0, 7.119.1.

GHSA-593m-55hh-j8gv at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-593m-55hh-j8gv
Severity MODERATE
CVSS v3.1 Base Score 5.6
CWE Classification CWE-913: Improper Control of Dynamically-Managed Code Resources
Affected Product @sentry/browser
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.6

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

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

How to Fix GHSA-593m-55hh-j8gv

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

@sentry/browser fixed: 8.33.0
npm install @sentry/browser@8.33.0
@sentry/browser fixed: 7.119.1
npm install @sentry/browser@7.119.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 @sentry/browser

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-593m-55hh-j8gv, inspect your project dependencies using npm:

npm ls @sentry/browser

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

Note: The npm ls @sentry/browser 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-913: Improper Control of Dynamically-Managed Code Resources, where the product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements. In @sentry/browser, 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 In case a Prototype Pollution vulnerability is present in a user's application or bundled libraries, the Sentry SDK could potentially serve as a gadget to exploit that vulnerability. The exploitability depends on the specific details of the underlying Prototype Pollution issue. > [!NOTE] > This advisory does not indicate the presence of a Prototype Pollution within the Sentry SDK itself. Users are strongly advised to first address any Prototype Pollution vulnerabilities in their application, as they pose a more critical security risk. ### Patches The issue was patched in all Sentry JavaScript SDKs starting from the [8.33.0](https://github.com/getsentry/sentry-javascript/releases/tag/8.33.0) version. Also, the fix was backported to SDK v7 in [7.119.1](https://github.com/getsentry/sentry-javascript/releases/tag/7.119.1). ### References * [Prototype Pollution](https://portswigger.net/web-security/prototype-pollution) * [Prototype Pollution gadgets](https://portswigger.net/web-security/prototype-pollution#prototype-pollution-gadgets) * [sentry-javascript#13838](https://github.com/getsentry/sentry-javascript/pull/13838)

GHSA-593m-55hh-j8gv Affected @sentry/browser Versions

2 component(s)
Fixed Versions:
8.33.07.119.1
Product / Package Ecosystem Affected Versions Fixed Version
@sentry/browser
npm
≥ 8.0.0-alpha.1
< 8.33.0
8.33.0
@sentry/browser
npm
< 7.119.1
7.119.1

References

Frequently Asked Questions

What is GHSA-593m-55hh-j8gv?
GHSA-593m-55hh-j8gv is a security vulnerability in @sentry/browser involving Sentry SDK Prototype Pollution gadget in JavaScript SDKs under CWE-913: Improper Control of Dynamically-Managed Code Resources.
Which @sentry/browser versions are affected?
Affected versions include releases prior to 8.33.0, 7.119.1 across affected packages: @sentry/browser.
What version fixes GHSA-593m-55hh-j8gv?
Upgrading to 8.33.0, 7.119.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @sentry/browser affected?
Yes, @sentry/browser is affected in releases prior to 8.33.0, 7.119.1. Upgrade your dependency to 8.33.0, 7.119.1 or later.
What is the CVSS score of GHSA-593m-55hh-j8gv?
GHSA-593m-55hh-j8gv has a CVSS v3.1 base score of 5.6 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L.
What CWE is associated with GHSA-593m-55hh-j8gv?
GHSA-593m-55hh-j8gv is classified under CWE-913: Improper Control of Dynamically-Managed Code Resources (The product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements.).
How can I check npm dependencies for GHSA-593m-55hh-j8gv?
Run the dependency tree command: 'npm ls @sentry/browser'. 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-593m-55hh-j8gv",
  "modified" : "2024-10-04T16:32:02Z",
  "published" : "2024-10-03T18:26:53Z",
  "aliases" : [ ],
  "summary" : "Sentry SDK Prototype Pollution gadget in JavaScript SDKs",
  "details" : "### Impact\nIn case a Prototype Pollution vulnerability is present in a user's application or bundled libraries, the Sentry SDK could potentially serve as a gadget to exploit that vulnerability. The exploitability depends on the specific details of the underlying Prototype Pollution issue.\n\n> [!NOTE]\n> This advisory does not indicate the presence of a Prototype Pollution within the Sentry SDK itself. Users are strongly advised to first address any Prototype Pollution vulnerabilities in their application, as they pose a more critical security risk.\n\n### Patches\nThe issue was patched in all Sentry JavaScript SDKs starting from the [8.33.0](https://github.com/getsentry/sentry-javascript/releases/tag/8.33.0) version.\nAlso, the fix was backported to SDK v7 in [7.119.1](https://github.com/getsentry/sentry-javascript/releases/tag/7.119.1).\n\n### References\n* [Prototype Pollution](https://portswigger.net/web-security/prototype-pollution)\n* [Prototype Pollution gadgets](https://portswigger.net/web-security/prototype-pollution#prototype-pollution-gadgets)\n* [sentry-javascript#13838](https://github.com/getsentry/sentry-javascript/pull/13838)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@sentry/browser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0-alpha.1"
      }, {
        "fixed" : "8.33.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@sentry/browser"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.119.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry-javascript/security/advisories/GHSA-593m-55hh-j8gv"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry-javascript/pull/13838"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry-javascript/commit/35bdc87dee3498794e34c1ad35dd9927950c8766"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/getsentry/sentry-javascript"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry-javascript/releases/tag/7.119.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/getsentry/sentry-javascript/releases/tag/8.33.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-913" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-03T18:26:53Z",
    "nvd_published_at" : null
  }
}