VDB

CVE-2024-22195

CVE-2024-22195 PUBLISHED CVSS 5.4 MEDIUM

Jinja vulnerable to Cross-Site Scripting (XSS)

Reported by github_m · Published January 11, 2024

Jinja2 is fixed in 3.1.3 (PyPI)

Jinja is an extensible templating engine. Special placeholders in the template allow writing code similar to Python syntax. It is possible to inject arbitrary HTML attributes into the rendered HTML template, potentially leading to Cross-Site Scripting (XSS). The Jinja `xmlattr` filter can be abused to inject arbitrary HTML attribute keys and values, bypassing the auto escaping mechanism and potentially leading to XSS. It may also be possible to bypass attribute validation checks if they are blacklist-based.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
Jinja2PyPI3.1.3
python3-jinja2Amazon Linux2.11.3-1.amzn2023.0.3, 2.7.2-4.amzn2.0.3
checkovChainguard3.0.34-r1
python-jinja2Amazon Linux2.7.2-3.amzn2.0.1

Risk scores

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

Affected products

VendorProductVersions
palletsjinja< 3.1.3
PyPIJinja20
amazon:2023python3-jinja20
chainguardcheckov0
amazon:2python-jinja20
amazon:2python3-jinja20
palletsjinja0
chainguardpy3-jinja20
chainguardkubeflow-pipelines-visualization-server0
wolfipy3-jinja20
chainguardreflex0
wolfikubeflow-pipelines-visualization-server0
palletsprojectsjinja
wolfireflex0
wolficheckov0

Timeline

  • Jan 11, 2024 CVE Published
  • Jan 18, 2024 EPSS Score (30 in total, the first dated here)
  • Feb 8, 2024 PoC Published
  • Oct 4, 2024 Coalition ESS Score (9 in total, the first dated here)
  • Jan 17, 2026 Security Advisory (76 in total, the first dated here)
  • Aug 10, 2026 Distribution Patch (70 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-22195
vulnetix vdb fixes CVE-2024-22195

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-22195/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›