{"id":"GHSA-cg48-9hh2-x6mx","summary":"HTML Injection in preact","details":"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.","modified":"2021-09-27T20:53:56Z","published":"2020-09-02T18:28:58Z","database_specific":{"cwe_ids":["CWE-74"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2020-08-31T18:37:35Z","nvd_published_at":null},"references":[{"type":"WEB","url":"https://github.com/developit/preact/pull/1528"},{"type":"PACKAGE","url":"https://github.com/developit/preact"},{"type":"WEB","url":"https://github.com/developit/preact/releases/tag/10.0.0-beta.1"},{"type":"WEB","url":"https://medium.com/dailyjs/exploiting-script-injection-flaws-in-reactjs-883fb1fe36c1"},{"type":"WEB","url":"https://www.npmjs.com/advisories/835"}],"affected":[{"package":{"name":"preact","ecosystem":"npm","purl":"pkg:npm/preact"},"ranges":[{"type":"SEMVER","events":[{"introduced":"10.0.0-alpha.0"},{"fixed":"10.0.0-beta.1"}]}],"database_specific":{"last_known_affected_version_range":"\u003c= 10.0.0-beta.0","source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-cg48-9hh2-x6mx/GHSA-cg48-9hh2-x6mx.json"}}],"schema_version":"1.9.0"}