Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. justhtml
  4. ›
  5. GHSA-qvc2-mg72-jjhx

GHSA-qvc2-mg72-jjhx: JustHTML Affected by Mutation XSS via Literal Text Serialization in Raw Text Elements (style/script)

March 18, 2026

Sanitized DOM trees can be unsafe to serialize when a custom policy allows raw-text elements such as <style> or <script>.

The issue affects DOM trees that are constructed or modified programmatically and then passed through sanitize_dom() with a policy that keeps these elements. Text nodes inside <style> and <script> are serialized literally, so attacker-controlled text containing the matching closing tag sequence can break out of the raw-text context and inject HTML into the serialized output.

The default sanitization policy is not affected because it drops the contents of style and script.

References

  • github.com/EmilStenstrom/justhtml
  • github.com/EmilStenstrom/justhtml/security/advisories/GHSA-qvc2-mg72-jjhx
  • github.com/advisories/GHSA-qvc2-mg72-jjhx

Code Behaviors & Features

Detect and mitigate GHSA-qvc2-mg72-jjhx with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 1.12.0

Fixed versions

  • 1.12.0

Solution

Upgrade to version 1.12.0 or above.

Impact 5.4 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/justhtml/GHSA-qvc2-mg72-jjhx.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:22 +0000.