Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-34064— Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter

Quick assessment

Affected
pallets jinja
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Pallets Jinja是一款使用Python语言编写的模板引擎。 Pallets Jinja 3.1.4之前版本存在安全漏洞,该漏洞源于将用户输入作为键传递给 xmlattr 过滤器时,Jinja 容易受到 HTML 属性注入。

CVSS 5.4 · Medium EPSS 0.98% · P61
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-34064

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
在Web页面生成时对输入的转义处理不恰当(跨站脚本)
Source: CVE Program / CVE List V5
Vulnerability Title
Pallets Jinja 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Pallets Jinja是一款使用Python语言编写的模板引擎。 Pallets Jinja 3.1.4之前版本存在安全漏洞,该漏洞源于将用户输入作为键传递给 xmlattr 过滤器时,Jinja 容易受到 HTML 属性注入。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
pallets jinja < 3.1.4 -

II. Public POCs for CVE-2024-34064

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-34064

请登录查看更多情报信息。

Patches & Fixes for CVE-2024-34064 (1)

Vendor Advisories for CVE-2024-34064 (1)

Mailing List Discussions for CVE-2024-34064 (3)

IV. Related Vulnerabilities

V. Comments for CVE-2024-34064

No comments yet


Leave a comment