{"id":"CVE-2024-47075","aliases":["CVE-2024-47075","GHSA-j827-6rgf-9629"],"related":[],"kind":"vulnerability","state":"published","title":"DOM Clobbering gadgets found in layui that lead to Cross-site Scripting","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### 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","format":"markdown","source":"ghsa"},{"lang":"es","text":"LayUI es una librería de componentes de interfaz de usuario web modular minimalista nativa. Las versiones anteriores a la 2.9.17 tienen una vulnerabilidad de DOM Clobbering que puede provocar Cross-Site Scripting (XSS) en páginas web donde hay elementos HTML controlados por el atacante (por ejemplo, etiquetas `img` con atributos `name` no saneados). La versión 2.9.17 corrige este problema.","source":"nvd"}],"published":"2024-09-26T17:08:19.996Z","modified":"2026-06-17T07:56:30.017Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","score":6.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","score":6.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H","score":6.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 2.9.17","status":"affected"}],"vendor":"layui","product":"layui","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.9.17"}],"ecosystem":"npm","package":"layui","purl":"pkg:npm/layui","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.9.17"}],"vendor":"layui","product":"layui","cpe":"cpe:2.3:a:layui:layui:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/layui/layui/security/advisories/GHSA-j827-6rgf-9629","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/layui/layui/commit/f756b41d63bf3d488a2cb042918638c9851bf2b0","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47075","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/layui/layui","tags":["package"],"sources":["ghsa"]},{"url":"https://layui.dev/notes/share/security-currentscript.html","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-26T17:57:38.383Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-47075","url":"https://www.cve.org/CVERecord?id=CVE-2024-47075","licence":"CVE Terms of Use","modified":"2024-09-26T18:06:22.177Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-j827-6rgf-9629","url":"https://github.com/advisories/GHSA-j827-6rgf-9629","licence":"CC-BY-4.0","modified":"2025-08-15T16:25:42.000Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-47075","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-47075","licence":"Public domain","modified":"2026-06-17T07:56:30.017Z"}],"updatedAt":"2026-11-25T22:58:45.799Z","epss":{"score":0.00339,"percentile":0.29292,"date":"2026-12-01T12:00:22.000Z"}}