{"id":"CVE-2024-47075","aliases":["EUVD-2024-2817","GHSA-j827-6rgf-9629"],"status":"published","title":"DOM Clobbering gadgets found in layui that lead to Cross-site Scripting","description":"LayUI is a native minimalist modular Web UI component library. Versions prior to 2.9.17 have a DOM Clobbering vulnerability 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. Version 2.9.17 fixes this issue.","severity":{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00339,"percentile":0.27686,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2024-09-26T17:08:19Z","modified":"2026-11-11T10:30:38Z","fixes":[{"ecosystem":"npm","package":"layui","fixed_in":["2.9.17"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"layui","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.9.17"}]}]},{"source":"osv","ecosystem":"npm","package":"layui","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.9.17"}]}]}],"products":[{"vendor":"layui","product":"layui"}],"references":[{"url":"https://github.com/layui/layui/security/advisories/GHSA-j827-6rgf-9629","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/layui/layui/commit/f756b41d63bf3d488a2cb042918638c9851bf2b0","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://layui.dev/notes/share/security-currentscript.html","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47075","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-j827-6rgf-9629"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/47xxx/CVE-2024-47075.json","tags":["advisory"]},{"url":"https://github.com/layui/layui","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-47075","title":"DOM Clobbering gadgets found in layui that lead to Cross-site Scripting","description":"LayUI is a native minimalist modular Web UI component library. Versions prior to 2.9.17 have a DOM Clobbering vulnerability 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. Version 2.9.17 fixes this issue.","status":"published","published":"2024-09-26T17:08:19.996Z","modified":"2024-09-26T18:06:22.177Z","cvss":[{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","level":"medium","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:33:57.302325Z"}],"euvd":[{"id":"EUVD-2024-2817","description":"LayUI is a native minimalist modular Web UI component library. Versions prior to 2.9.17 have a DOM Clobbering vulnerability 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. Version 2.9.17 fixes this issue.","status":"published","published":"2024-09-26T17:08:19Z","modified":"2024-09-26T18:06:22Z","cvss":[{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","level":"medium"}],"updated_at":"2026-11-03T00:28:08.503734Z"}],"ghsa":[{"id":"GHSA-j827-6rgf-9629","title":"Layui has DOM Clobbering gadgets that leads to Cross-site Scripting","description":"### Summary\nA 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.\n\nIt's worth noting that we’ve identifed similar issues in other popular client-side libraries like Webpack ([CVE-2024-43788](https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986)) and Vite ([CVE-2024-45812](https://github.com/vitejs/vite/security/advisories/GHSA-64vr-g452-qvp3)), which might serve as valuable references.\n\n###  Backgrounds\n\nDOM 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. \n\n### Impact\n\nThis 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.\n\n### Patch\n\nThis problem has been patched in Layui 2.9.17. You can find the official fix announcement at: \nhttps://layui.dev/notes/share/security-currentscript.html","status":"published","published":"2024-09-26T17:54:24Z","modified":"2024-09-26T21:11:03Z","cvss":[{"version":"4.0","score":4.8,"vector":"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","level":"medium"},{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:38:06.988799Z"}],"nvd":[{"id":"CVE-2024-47075","description":"LayUI is a native minimalist modular Web UI component library. Versions prior to 2.9.17 have a DOM Clobbering vulnerability 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. Version 2.9.17 fixes this issue.","status":"published","published":"2024-09-26T18:15:08.757Z","modified":"2026-06-17T07:56:30.017Z","cvss":[{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","level":"medium","assessor":"secondary"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:10:29.044588Z"}],"osv":[{"id":"CVE-2024-47075","title":"DOM Clobbering gadgets found in layui that lead to Cross-site Scripting","description":"LayUI is a native minimalist modular Web UI component library. Versions prior to 2.9.17 have a DOM Clobbering vulnerability 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. Version 2.9.17 fixes this issue.","status":"published","published":"2024-09-26T17:08:19.996Z","modified":"2026-11-11T10:30:38.399317204Z","cvss":[{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-11T11:06:29.968286Z"},{"id":"GHSA-j827-6rgf-9629","title":"Layui has DOM Clobbering gadgets that leads to Cross-site Scripting","description":"### Summary\nA 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.\n\nIt's worth noting that we’ve identifed similar issues in other popular client-side libraries like Webpack ([CVE-2024-43788](https://github.com/webpack/webpack/security/advisories/GHSA-4vvj-4cpr-p986)) and Vite ([CVE-2024-45812](https://github.com/vitejs/vite/security/advisories/GHSA-64vr-g452-qvp3)), which might serve as valuable references.\n\n###  Backgrounds\n\nDOM 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. \n\n### Impact\n\nThis 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.\n\n### Patch\n\nThis problem has been patched in Layui 2.9.17. You can find the official fix announcement at: \nhttps://layui.dev/notes/share/security-currentscript.html","status":"published","published":"2024-09-26T17:54:24Z","modified":"2025-08-15T16:25:42Z","cvss":[{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","level":"medium"},{"version":"4.0","score":4.8,"vector":"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","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:49.977351Z"}]}}
