UBUNTU-CVE-2024-34064

Source
https://ubuntu.com/security/CVE-2024-34064
Import Source
https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-34064.json
JSON Data
https://api.osv.dev/v1/vulns/UBUNTU-CVE-2024-34064
Related
Published
2024-05-06T15:15:00Z
Modified
2024-10-15T14:14:11Z
Summary
[none]
Details

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.

References

Affected packages

Ubuntu:Pro:14.04:LTS / jinja2

Package

Name
jinja2
Purl
pkg:deb/ubuntu/jinja2?arch=src?distro=trusty/esm

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.7.2-2ubuntu0.1~esm3

Affected versions

2.*

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",
    "ubuntu_priority": "medium",
    "binaries": [
        {
            "binary_version": "2.7.2-2ubuntu0.1~esm3",
            "binary_name": "python-jinja2"
        },
        {
            "binary_version": "2.7.2-2ubuntu0.1~esm3",
            "binary_name": "python-jinja2-doc"
        },
        {
            "binary_version": "2.7.2-2ubuntu0.1~esm3",
            "binary_name": "python3-jinja2"
        }
    ]
}

Ubuntu:Pro:16.04:LTS / jinja2

Package

Name
jinja2
Purl
pkg:deb/ubuntu/jinja2?arch=src?distro=esm-infra/xenial

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.8-1ubuntu0.1+esm3

Affected versions

2.*

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",
    "ubuntu_priority": "medium",
    "binaries": [
        {
            "binary_version": "2.8-1ubuntu0.1+esm3",
            "binary_name": "python-jinja2"
        },
        {
            "binary_version": "2.8-1ubuntu0.1+esm3",
            "binary_name": "python-jinja2-doc"
        },
        {
            "binary_version": "2.8-1ubuntu0.1+esm3",
            "binary_name": "python3-jinja2"
        }
    ]
}

Ubuntu:Pro:18.04:LTS / jinja2

Package

Name
jinja2
Purl
pkg:deb/ubuntu/jinja2?arch=src?distro=esm-infra/bionic

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.10-1ubuntu0.18.04.1+esm2

Affected versions

2.*

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",
    "ubuntu_priority": "medium",
    "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": "python-jinja2-doc"
        },
        {
            "binary_version": "2.10-1ubuntu0.18.04.1+esm2",
            "binary_name": "python3-jinja2"
        }
    ]
}

Ubuntu:20.04:LTS / jinja2

Package

Name
jinja2
Purl
pkg:deb/ubuntu/jinja2?arch=src?distro=focal

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.10.1-2ubuntu0.3

Affected versions

2.*

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",
    "ubuntu_priority": "medium",
    "binaries": [
        {
            "binary_version": "2.10.1-2ubuntu0.3",
            "binary_name": "python-jinja2"
        },
        {
            "binary_version": "2.10.1-2ubuntu0.3",
            "binary_name": "python-jinja2-doc"
        },
        {
            "binary_version": "2.10.1-2ubuntu0.3",
            "binary_name": "python3-jinja2"
        }
    ]
}

Ubuntu:22.04:LTS / jinja2

Package

Name
jinja2
Purl
pkg:deb/ubuntu/jinja2?arch=src?distro=jammy

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.0.3-1ubuntu0.2

Affected versions

2.*

2.11.3-1

3.*

3.0.1-2
3.0.3-1
3.0.3-1ubuntu0.1

Ecosystem specific

{
    "availability": "No subscription required",
    "ubuntu_priority": "medium",
    "binaries": [
        {
            "binary_version": "3.0.3-1ubuntu0.2",
            "binary_name": "python-jinja2-doc"
        },
        {
            "binary_version": "3.0.3-1ubuntu0.2",
            "binary_name": "python3-jinja2"
        }
    ]
}

Ubuntu:24.10 / jinja2

Package

Name
jinja2
Purl
pkg:deb/ubuntu/jinja2?arch=src?distro=oracular

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.1.3-1ubuntu1

Affected versions

3.*

3.1.2-1ubuntu1
3.1.3-1

Ecosystem specific

{
    "availability": "No subscription required",
    "ubuntu_priority": "medium",
    "binaries": [
        {
            "binary_version": "3.1.3-1ubuntu1",
            "binary_name": "python-jinja2-doc"
        },
        {
            "binary_version": "3.1.3-1ubuntu1",
            "binary_name": "python3-jinja2"
        }
    ]
}

Ubuntu:24.04:LTS / jinja2

Package

Name
jinja2
Purl
pkg:deb/ubuntu/jinja2?arch=src?distro=noble

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.1.2-1ubuntu1.1

Affected versions

3.*

3.1.2-1
3.1.2-1ubuntu1

Ecosystem specific

{
    "availability": "No subscription required",
    "ubuntu_priority": "medium",
    "binaries": [
        {
            "binary_version": "3.1.2-1ubuntu1.1",
            "binary_name": "python-jinja2-doc"
        },
        {
            "binary_version": "3.1.2-1ubuntu1.1",
            "binary_name": "python3-jinja2"
        }
    ]
}