GHSA-8jh9-wqpf-q52c: Sweetalert2 Sweetalert2 V8.19.1 And Above Contains Vulnerability

LOW
CWE-912
Published
Advisory Summary

GHSA-8jh9-wqpf-q52c is a LOW sweetalert2 v8.19.1 and above contains vulnerability (CWE-912: Hidden Functionality) affecting Sweetalert2 libraries in the npm ecosystem. The issue involves sweetalert2 v8.19.1 and above contains hidden functionality. Remediation is available by upgrading affected packages to version 11.22.4.

GHSA-8jh9-wqpf-q52c at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-8jh9-wqpf-q52c
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-912: Hidden Functionality
Affected Product Sweetalert2
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-8jh9-wqpf-q52c

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

sweetalert2 fixed: 11.22.4
npm install sweetalert2@11.22.4
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 sweetalert2

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-8jh9-wqpf-q52c, inspect your project dependencies using npm:

npm ls sweetalert2

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

Note: The npm ls sweetalert2 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-912: Hidden Functionality, where the product contains functionality that is not documented, not part of the specification, and not accessible through an interface or command sequence that is obvious to the product's users or administrators. In Sweetalert2, 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

`sweetalert2` versions 8.19.1 and up until 9.0.0 are vulnerable to hidden functionality that was introduced by the maintainer. The package outputs audio and/or video messages that do not pertain to the functionality of the package and is not included in versions below 8.19.1. ### Workaround Users who are unable to update to the fixed version (11.22.4) can use package versions 8.19.0 and below, as they do not contain the hidden functionality.

GHSA-8jh9-wqpf-q52c Affected Sweetalert2 Versions

1 component(s)
Fixed Versions:
11.22.4
Product / Package Ecosystem Affected Versions Fixed Version
sweetalert2
npm
≥ 8.19.1
< 11.22.4
11.22.4

References

Frequently Asked Questions

What is GHSA-8jh9-wqpf-q52c?
GHSA-8jh9-wqpf-q52c is a security vulnerability in Sweetalert2 involving sweetalert2 v8.19.1 and above contains hidden functionality under CWE-912: Hidden Functionality.
Which Sweetalert2 versions are affected?
Affected versions include releases prior to 11.22.4 across affected packages: sweetalert2.
What version fixes GHSA-8jh9-wqpf-q52c?
Upgrading to 11.22.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sweetalert2 affected?
Yes, sweetalert2 is affected in releases prior to 11.22.4. Upgrade your dependency to 11.22.4 or later.
What CWE is associated with GHSA-8jh9-wqpf-q52c?
GHSA-8jh9-wqpf-q52c is classified under CWE-912: Hidden Functionality (The product contains functionality that is not documented, not part of the specification, and not accessible through an interface or command sequence that is obvious to the product's users or administrators.).
How can I check npm dependencies for GHSA-8jh9-wqpf-q52c?
Run the dependency tree command: 'npm ls sweetalert2'. 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-8jh9-wqpf-q52c",
  "modified" : "2025-09-24T20:11:29Z",
  "published" : "2022-11-23T15:49:51Z",
  "aliases" : [ ],
  "summary" : "sweetalert2 v8.19.1 and above contains hidden functionality",
  "details" : "`sweetalert2` versions 8.19.1 and up until 9.0.0 are vulnerable to hidden functionality that was introduced by the maintainer. The package outputs audio and/or video messages that do not pertain to the functionality of the package and is not included in versions below 8.19.1.\n\n### Workaround\nUsers who are unable to update to the fixed version (11.22.4) can use package versions 8.19.0 and below, as they do not contain the hidden functionality.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "sweetalert2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.19.1"
      }, {
        "fixed" : "11.22.4"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 9.0.0"
    }
  } ],
  "references" : [ {
    "type" : "PACKAGE",
    "url" : "https://github.com/sweetalert2/sweetalert2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sweetalert2/sweetalert2/releases/tag/v11.22.4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sweetalert2/sweetalert2/releases/tag/v11.4.9"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/sweetalert2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-912" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-11-23T15:49:51Z",
    "nvd_published_at" : null
  }
}