Advisory record · GHSA-h5c8-rqwp-cp95

Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter

CVSS 5.4 MediumEPSS 0.0089 · 60th percentile

Published by the GitHub Advisory Database at 11 Jan 2024, 15:20 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

PackageEcosystemAffectedFixed in
jinja2PyPI<3.1.33.1.3
Identifiers
GHSA-h5c8-rqwp-cp95 · CVE-2024-22195 · PYSEC-2026-1473
Weakness (CWE)
CWE-79
Published
11 Jan 2024
Updated
10 Sept 2026

Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

Jinja2 versions before 3.1.3 are vulnerable. The xmlattr filter accepts keys containing spaces, so if an application takes attribute keys from user input and renders them on pages other users view, an attacker can inject extra HTML attributes and carry out cross-site scripting. Upgrade jinja2 to version 3.1.3 or later. The source notes that accepting keys from users is an uncommon use of the filter, and applications doing so should validate the keys they receive.

Written 5 Nov 2026.

Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

Severity and exploitation

ScoreRatingCVSSVectorSource
5.4 Medium 3.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N CNA (GitHub_M)
  • CISA KEV Not listed.
  • EPSS 0.0089, the 60th percentile, on 24 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

Timeline

  1. 10 Jan 2024, 23:13 UTC Published by the maintainers as a GitHub repository advisory
  2. 31 Oct 2026, 14:36 UTC First seen by agentprime
  3. 31 Oct 2026, 14:36 UTC Confirmed by OSV

Sources

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.