{"answers":{"affected":"2 open source packages ship an affected version, including preact.","exploited":"There is no known exploitation of GHSA-cg48-9hh2-x6mx in the wild and no public exploit code.","fix":"Upgrade preact to 10.0.0-beta.1 or later.","what":"GHSA-cg48-9hh2-x6mx is a cross-site scripting vulnerability in preact, published on 2 Sep 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-cg48-9hh2-x6mx and fix it if it is affected.\n\nWhat it is: GHSA-cg48-9hh2-x6mx is a cross-site scripting vulnerability in preact, published on 2 Sep 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-cg48-9hh2-x6mx in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- preact (npm): affected from 10.0.0-alpha.0; fixed in 10.0.0-beta.1\n- preact (npm): affected from 10.0.0-alpha.0; fixed in 10.0.0-beta.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-cg48-9hh2-x6mx/ (Markdown: https://insights.sbomify.com/GHSA-cg48-9hh2-x6mx/index.md)","id":"GHSA-cg48-9hh2-x6mx","markdown":"https://insights.sbomify.com/GHSA-cg48-9hh2-x6mx/index.md","name":"GHSA-cg48-9hh2-x6mx","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript UI library","requires_auth":"none","summary":"Attackers can inject JavaScript via unsanitized JSON input in preact, leading to Cross-Site Scripting and potential code execution.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"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## Recommendation\n\nUpgrade to version 10.0.0-beta.1.","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"HTML Injection in preact","id":"GHSA-cg48-9hh2-x6mx","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2020"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["10.0.0-beta.1"],"introduced":["10.0.0-alpha.0"],"last_affected":[],"package":"preact","purl":null,"source":"GHSA-cg48-9hh2-x6mx"},{"ecosystem":"npm","fixed":["10.0.0-beta.1"],"introduced":["10.0.0-alpha.0"],"last_affected":[],"package":"preact","purl":"pkg:npm/preact","source":"GHSA-cg48-9hh2-x6mx"}],"products":null,"published":"2020-09-02","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can inject JavaScript via unsanitized JSON input in preact, leading to Cross-Site Scripting and potential code execution.","url":"https://insights.sbomify.com/GHSA-cg48-9hh2-x6mx/"}