Layui has DOM Clobbering gadgets that leads to Cross-site Scripting
CVE-2024-47075GHSA-j827-6rgf-9629
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (layui 2.9.17), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
npm layui
- Affected
- < 2.9.17
- Fixed in
- 2.9.17
Sources
- Open Source Vulnerabilities (OSV.dev), including the GitHub Advisory Database
OSV record GHSA-j827-6rgf-9629 lists affected ranges: npm layui >=0 <2.9.17 (fixed)
VerifiedObserved Structured OSV record; GitHub-reviewed advisory.
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-j827-6rgf-9629 lists affected ranges: npm layui >=0 <2.9.17
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS 4.0
- 4.8 · CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N · score source
- EPSS
- CVE-2024-47075: 0.34% estimated exploitation activity in the next 30 days; percentile 27.38 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description
As published by the source; long descriptions are shortened.
Summary A DOM Clobbering vulnerability has been discovered in layui that can lead to Cross-site Scripting (XSS) on web pages where attacker-controlled HTML elements (e.g., img tags with unsanitized name attributes) are present. It's worth noting that we’ve identifed similar issues in other popular client-side libraries like Webpack (CVE-2024-43788) and Vite (CVE-2024-45812), which might serve as valuable references. Backgrounds DOM Clobbering is a type of code-reuse attack where the attacker first embeds a piece of non-script, seemingly benign HTML markups in the webpage (e.g. through a post or comment) and leverages the gadgets (pieces of js code snippet) living in the existing libraries to transform it into executable code. Impact This vulnerability can lead to cross-site scripting (XSS) on websites that uses layui library and allow users to inject certain scriptless HTML tags with improperly sanitized name or id attributes. Patch This problem has been patched in Layui 2.9.17. You…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 3 · amended ·
Amended from ghsa record GHSA-j827-6rgf-9629
- Revision 2 · amended ·
Reviewed OSV alias/range/CVSS4 correction; package source scopes and original publication preserved. No customer finding resolved.
- Revision 1 · created ·
Published from osv record GHSA-j827-6rgf-9629
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: CVE-2024-47075 Advisory: Layui has DOM Clobbering gadgets that leads to Cross-site Scripting IDs: CVE-2024-47075, GHSA-j827-6rgf-9629 Record: https://patchnext.com/advisories/cve-2024-47075 (revision 3, source checked 26 Oct 2026, 12:31 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: Medium (CVSS 4.8) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: layui 2.9.17. A vendor fix does not mean a deployment is fixed. ## Affected components - npm layui: affected < 2.9.17; fixed in 2.9.17 ## Suggested inspection (read-only) - `npm ls layui --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on layui. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://osv.dev/vulnerability/GHSA-j827-6rgf-9629 (OSV record GHSA-j827-6rgf-9629 lists affected ranges: npm layui >=0 <2.9.17 (fixed)) - Verified: https://github.com/advisories/GHSA-j827-6rgf-9629 (GitHub-reviewed advisory GHSA-j827-6rgf-9629 lists affected ranges: npm layui >=0 <2.9.17) Commands are suggestions: review each one before running it.
Loading voting…