VDB

CVE-2024-34064

CVE-2024-34064 PUBLISHED CVSS 5.4 MEDIUM

Reported by github_m · Published May 6, 2024

jinja2 is fixed in 3.1.4 (PyPI)

Jinja is an extensible templating engine. The `xmlattr` filter in affected versions of Jinja accepts keys containing non-attribute characters. XML/HTML attributes cannot contain spaces, `/`, `>`, or `=`, as each would then be interpreted as starting a separate attribute. If an application accepts keys (as opposed to only values) as user input, and renders these in pages that other users see as well, an attacker could use this to inject other attributes and perform XSS. The fix for CVE-2024-22195 only addressed spaces but not other characters. Accepting keys as user input is now explicitly considered an unintended use case of the `xmlattr` filter, and code that does so without otherwise validating the input should be flagged as insecure, regardless of Jinja version. Accepting _values_ as user input continues to be safe. This vulnerability is fixed in 3.1.4.

Fixed versions

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

PackageEcosystemFixed in
jinja2PyPI3.1.4
confluent-docker-utilsChainguard0.0.77-r0
reflexWolfi0.5.0-r0
checkovChainguard3.0.34-r1
reflexChainguard0.5.0-r0
nemoChainguard1.23.0-r12
kubeflow-volumes-web-appChainguard1.8.0-r6
checkovWolfi3.0.34-r1
py3-jinja2Chainguard3.1.4-r1
kubeflow-jupyter-web-appChainguard1.8.0-r7
python3-jinja2Amazon Linux2.11.3-1.amzn2023.0.4, 2.7.2-4.amzn2.0.4
dask-gatewayChainguard2024.1.0-r4

3 more packages have a fixed version. See every fix in Lookup.

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.4
chainguardconfluent-docker-utils0
wolfireflex0
chainguardcheckov0
chainguardreflex0
chainguardnemo0
palletsprojectsjinja2
chainguardkubeflow-volumes-web-app0
wolficheckov0
chainguardpy3-jinja20
chainguardkubeflow-jupyter-web-app0
amazon:2023python3-jinja20
chainguarddask-gateway0
wolfikubeflow-pipelines-visualization-server0
amazon:2python3-jinja20
PyPIJinja20
chainguardkubeflow-pipelines-visualization-server0
palletsjinja0
chainguardsuperset0
wolfidask-gateway0

…and 8 more

Timeline

  • May 6, 2024 CVE Published
  • May 7, 2024 EPSS Score (30 in total, the first dated here)
  • Oct 4, 2024 Coalition ESS Score (10 in total, the first dated here)
  • Jan 11, 2026 Security Advisory (80 in total, the first dated here)
  • Feb 4, 2026 CVE Updated
  • Aug 10, 2026 Distribution Patch (71 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-34064
vulnetix vdb fixes CVE-2024-34064

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-34064/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 ›