Advisory

GHSA-cg48-9hh2-x6mx

Also known as: None

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.

Recommendation

Upgrade to version 10.0.0-beta.1.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2020-09-02 18:28 UTC
Modified
2021-09-27 20:53 UTC

Affected packages and fixes

preact

npm · All systems

Affected

  • introduced 10.0.0-alpha.0, fixed 10.0.0-beta.1 (semver)

Fixed versions

10.0.0-beta.1

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences