{"id":"GHSA-cg48-9hh2-x6mx","aliases":["GHSA-cg48-9hh2-x6mx"],"related":[],"kind":"vulnerability","state":"published","title":"HTML Injection in preact","summary":"Versions of `preact` 10.x on prerelease tags alpha and beta prior to 10.0.0-beta.1 are vulnerable to HTML Injection. Due to insufficient input validation the package allows attackers to inject JavaScript objects as virtual-dom nodes, which may lead to Cross-Site Scripting. This requires user input parsed with `JSON.parse()` to be passed directly into JSX without sanitization.\n\n\n## Recommendation\n\nUpgrade to version 10.0.0-beta.1.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"Versions of `preact` 10.x on prerelease tags alpha and beta prior to 10.0.0-beta.1 are vulnerable to HTML Injection. Due to insufficient input validation the package allows attackers to inject JavaScript objects as virtual-dom nodes, which may lead to Cross-Site Scripting. This requires user input parsed with `JSON.parse()` to be passed directly into JSX without sanitization.\n\n\n## Recommendation\n\nUpgrade to version 10.0.0-beta.1.","format":"markdown","source":"ghsa"}],"published":"2020-09-02T18:28:58.000Z","modified":"2021-09-27T20:53:56.000Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-74"],"affected":[{"ranges":[{"type":"semver","introduced":"10.0.0-alpha.0","status":"affected","fixed":"10.0.0-beta.1"}],"ecosystem":"npm","package":"preact","purl":"pkg:npm/preact","source":"ghsa"}],"references":[{"url":"https://github.com/developit/preact/pull/1528","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/developit/preact","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/developit/preact/releases/tag/10.0.0-beta.1","tags":["web"],"sources":["ghsa"]},{"url":"https://medium.com/dailyjs/exploiting-script-injection-flaws-in-reactjs-883fb1fe36c1","tags":["web"],"sources":["ghsa"]},{"url":"https://www.npmjs.com/advisories/835","tags":["web"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cg48-9hh2-x6mx","url":"https://github.com/advisories/GHSA-cg48-9hh2-x6mx","licence":"CC-BY-4.0","modified":"2021-09-27T20:53:56.000Z"}],"updatedAt":"2026-11-25T22:56:45.087Z"}