# CVE-2024-22195: Jinja vulnerable to Cross-Site Scripting (XSS)

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.89%, higher than 60% of CVEs (2026-12-01)
- Published: 2024-01-11T02:25:44.239Z
- Modified: 2026-09-10T03:50:00.236Z
- Also known as: GHSA-h5c8-rqwp-cp95, PYSEC-2026-1473
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- pallets jinja: < 3.1.3
- jinja2 (PyPI): before 3.1.3
- palletsprojects jinja: before 3.1.3

## Every score

- GitHub_M: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`
- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`

## References

- <https://github.com/pallets/jinja/security/advisories/GHSA-h5c8-rqwp-cp95> (third-party-advisory, web)
- <https://github.com/pallets/jinja/releases/tag/3.1.3> (release-notes, web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5XCWZD464AJJJUBOO7CMPXQ4ROBC6JX2/>
- <https://lists.debian.org/debian-lts-announce/2024/01/msg00010.html> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/O7YWRBX6JQCWC2XXCTZ55C7DPMGICCN3/>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DELCVUUYX75I5K4Q5WMJG4MUZJA6VAIP/>
- <https://lists.debian.org/debian-lts-announce/2024/12/msg00009.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-22195> (advisory)
- <https://github.com/pallets/jinja/commit/716795349a41d4983a9a4771f7d883c96ea17be7> (fix, web)
- <https://github.com/pallets/jinja> (package)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5XCWZD464AJJJUBOO7CMPXQ4ROBC6JX2> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DELCVUUYX75I5K4Q5WMJG4MUZJA6VAIP> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/O7YWRBX6JQCWC2XXCTZ55C7DPMGICCN3> (web)
- <https://pypi.org/project/jinja2> (package)
- <https://github.com/advisories/GHSA-h5c8-rqwp-cp95> (advisory)

## Sources

- CVE List: [CVE-2024-22195](https://www.cve.org/CVERecord?id=CVE-2024-22195), CVE Terms of Use, modified 2025-11-03
- GitHub Advisory Database: [GHSA-h5c8-rqwp-cp95](https://github.com/advisories/GHSA-h5c8-rqwp-cp95), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-22195](https://nvd.nist.gov/vuln/detail/CVE-2024-22195), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1473](https://osv.dev/vulnerability/PYSEC-2026-1473), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2024-22195 · Whole record: https://cve.day/CVE-2024-22195.json · Rebuilt by cve.day 2026-11-25T22:58:36.024Z
