UBUNTU-CVE-2024-22195 (CVE-2024-22195)
Vulnerability from osv_ubuntu – Published: 2024-01-11 03:15 – Updated: 2026-11-24 10:02 – Source websiteJinja 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.
{
"affected": [
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "python-jinja2",
"binary_version": "2.7.2-2ubuntu0.1~esm2"
},
{
"binary_name": "python3-jinja2",
"binary_version": "2.7.2-2ubuntu0.1~esm2"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:14.04:LTS",
"name": "jinja2",
"purl": "pkg:deb/ubuntu/jinja2@2.7.2-2ubuntu0.1~esm2?arch=source\u0026distro=trusty/esm"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.7.2-2ubuntu0.1~esm2"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.7-3",
"2.7.1-1",
"2.7.2-1",
"2.7.2-2",
"2.7.2-2ubuntu0.1~esm1"
]
},
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "python-jinja2",
"binary_version": "2.8-1ubuntu0.1+esm2"
},
{
"binary_name": "python3-jinja2",
"binary_version": "2.8-1ubuntu0.1+esm2"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:16.04:LTS",
"name": "jinja2",
"purl": "pkg:deb/ubuntu/jinja2@2.8-1ubuntu0.1+esm2?arch=source\u0026distro=esm-infra/xenial"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.8-1ubuntu0.1+esm2"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.8-1",
"2.8-1ubuntu0.1",
"2.8-1ubuntu0.1+esm1"
]
},
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "python-jinja2",
"binary_version": "2.10-1ubuntu0.18.04.1+esm1"
},
{
"binary_name": "python3-jinja2",
"binary_version": "2.10-1ubuntu0.18.04.1+esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:18.04:LTS",
"name": "jinja2",
"purl": "pkg:deb/ubuntu/jinja2@2.10-1ubuntu0.18.04.1+esm1?arch=source\u0026distro=esm-infra/bionic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.10-1ubuntu0.18.04.1+esm1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.9.6-1",
"2.10-1",
"2.10-1ubuntu0.18.04.1"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "python-jinja2",
"binary_version": "2.10.1-2ubuntu0.2"
},
{
"binary_name": "python3-jinja2",
"binary_version": "2.10.1-2ubuntu0.2"
}
]
},
"package": {
"ecosystem": "Ubuntu:20.04:LTS",
"name": "jinja2",
"purl": "pkg:deb/ubuntu/jinja2@2.10.1-2ubuntu0.2?arch=source\u0026distro=focal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.10.1-2ubuntu0.2"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.10-2ubuntu1",
"2.10-2ubuntu2",
"2.10.1-1ubuntu1",
"2.10.1-2"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "python3-jinja2",
"binary_version": "3.0.3-1ubuntu0.1"
}
]
},
"package": {
"ecosystem": "Ubuntu:22.04:LTS",
"name": "jinja2",
"purl": "pkg:deb/ubuntu/jinja2@3.0.3-1ubuntu0.1?arch=source\u0026distro=jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.0.3-1ubuntu0.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"2.11.3-1",
"3.0.1-2",
"3.0.3-1"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "python3-jinja2",
"binary_version": "3.1.2-1ubuntu1"
}
]
},
"package": {
"ecosystem": "Ubuntu:24.04:LTS",
"name": "jinja2",
"purl": "pkg:deb/ubuntu/jinja2@3.1.2-1ubuntu1?arch=source\u0026distro=noble"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.2-1ubuntu1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"3.1.2-1"
]
}
],
"aliases": [],
"details": "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.",
"id": "UBUNTU-CVE-2024-22195",
"modified": "2026-11-24T10:02:01Z",
"published": "2024-01-11T03:15:00Z",
"references": [
{
"type": "REPORT",
"url": "https://ubuntu.com/security/CVE-2024-22195"
},
{
"type": "REPORT",
"url": "https://github.com/pallets/jinja/security/advisories/GHSA-h5c8-rqwp-cp95"
},
{
"type": "REPORT",
"url": "https://github.com/pallets/jinja/releases/tag/3.1.3"
},
{
"type": "ADVISORY",
"url": "https://ubuntu.com/security/notices/USN-6599-1"
},
{
"type": "REPORT",
"url": "https://www.cve.org/CVERecord?id=CVE-2024-22195"
}
],
"related": [
"USN-6599-1"
],
"schema_version": "1.9.2",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N",
"source": "CNA",
"type": "CVSS_V3"
},
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"source": "NVD",
"type": "CVSS_V3"
},
{
"score": "medium",
"source": "SELF",
"type": "Ubuntu"
}
],
"upstream": [
"CVE-2024-22195"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.