{"id":"USN-6787-1","summary":"jinja2 vulnerability","details":"It was discovered that Jinja2 incorrectly handled certain HTML attributes\nthat were accepted by the xmlattr filter. An attacker could use this issue\nto inject arbitrary HTML attribute keys and values to potentially execute\na cross-site scripting (XSS) attack.\n","modified":"2026-02-10T04:43:49Z","published":"2024-05-28T13:28:29Z","related":["UBUNTU-CVE-2024-34064"],"upstream":["CVE-2024-34064","UBUNTU-CVE-2024-34064"],"references":[{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-6787-1"},{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2024-34064"}],"affected":[{"package":{"name":"jinja2","ecosystem":"Ubuntu:Pro:14.04:LTS","purl":"pkg:deb/ubuntu/jinja2@2.7.2-2ubuntu0.1~esm3?arch=source&distro=trusty/esm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.7.2-2ubuntu0.1~esm3"}]}],"versions":["2.7-3","2.7.1-1","2.7.2-1","2.7.2-2","2.7.2-2ubuntu0.1~esm1","2.7.2-2ubuntu0.1~esm2"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro","binaries":[{"binary_version":"2.7.2-2ubuntu0.1~esm3","binary_name":"python-jinja2"},{"binary_version":"2.7.2-2ubuntu0.1~esm3","binary_name":"python3-jinja2"}]},"database_specific":{"cves_map":{"ecosystem":"Ubuntu:Pro:14.04:LTS","cves":[{"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"},{"type":"Ubuntu","score":"medium"}],"id":"CVE-2024-34064"}]},"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/usn/USN-6787-1.json"}},{"package":{"name":"jinja2","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/jinja2@2.8-1ubuntu0.1+esm3?arch=source&distro=esm-infra/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.8-1ubuntu0.1+esm3"}]}],"versions":["2.8-1","2.8-1ubuntu0.1","2.8-1ubuntu0.1+esm1","2.8-1ubuntu0.1+esm2"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro","binaries":[{"binary_version":"2.8-1ubuntu0.1+esm3","binary_name":"python-jinja2"},{"binary_version":"2.8-1ubuntu0.1+esm3","binary_name":"python3-jinja2"}]},"database_specific":{"cves_map":{"ecosystem":"Ubuntu:Pro:16.04:LTS","cves":[{"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"},{"type":"Ubuntu","score":"medium"}],"id":"CVE-2024-34064"}]},"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/usn/USN-6787-1.json"}},{"package":{"name":"jinja2","ecosystem":"Ubuntu:Pro:18.04:LTS","purl":"pkg:deb/ubuntu/jinja2@2.10-1ubuntu0.18.04.1+esm2?arch=source&distro=esm-infra/bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.10-1ubuntu0.18.04.1+esm2"}]}],"versions":["2.9.6-1","2.10-1","2.10-1ubuntu0.18.04.1","2.10-1ubuntu0.18.04.1+esm1"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro","binaries":[{"binary_version":"2.10-1ubuntu0.18.04.1+esm2","binary_name":"python-jinja2"},{"binary_version":"2.10-1ubuntu0.18.04.1+esm2","binary_name":"python3-jinja2"}]},"database_specific":{"cves_map":{"ecosystem":"Ubuntu:Pro:18.04:LTS","cves":[{"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"},{"type":"Ubuntu","score":"medium"}],"id":"CVE-2024-34064"}]},"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/usn/USN-6787-1.json"}},{"package":{"name":"jinja2","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/jinja2@2.10.1-2ubuntu0.3?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.10.1-2ubuntu0.3"}]}],"versions":["2.10-2ubuntu1","2.10-2ubuntu2","2.10.1-1ubuntu1","2.10.1-2","2.10.1-2ubuntu0.2"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_version":"2.10.1-2ubuntu0.3","binary_name":"python-jinja2"},{"binary_version":"2.10.1-2ubuntu0.3","binary_name":"python3-jinja2"}]},"database_specific":{"cves_map":{"ecosystem":"Ubuntu:20.04:LTS","cves":[{"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"},{"type":"Ubuntu","score":"medium"}],"id":"CVE-2024-34064"}]},"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/usn/USN-6787-1.json"}},{"package":{"name":"jinja2","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/jinja2@3.0.3-1ubuntu0.2?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.0.3-1ubuntu0.2"}]}],"versions":["2.11.3-1","3.0.1-2","3.0.3-1","3.0.3-1ubuntu0.1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_version":"3.0.3-1ubuntu0.2","binary_name":"python3-jinja2"}]},"database_specific":{"cves_map":{"ecosystem":"Ubuntu:22.04:LTS","cves":[{"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"},{"type":"Ubuntu","score":"medium"}],"id":"CVE-2024-34064"}]},"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/usn/USN-6787-1.json"}},{"package":{"name":"jinja2","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/jinja2@3.1.2-1ubuntu1.1?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.1.2-1ubuntu1.1"}]}],"versions":["3.1.2-1","3.1.2-1ubuntu1"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_version":"3.1.2-1ubuntu1.1","binary_name":"python3-jinja2"}]},"database_specific":{"cves_map":{"ecosystem":"Ubuntu:24.04:LTS","cves":[{"severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"},{"type":"Ubuntu","score":"medium"}],"id":"CVE-2024-34064"}]},"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/usn/USN-6787-1.json"}}],"schema_version":"1.7.3"}