Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 921734 - <dev-python/jinja-3.1.3: HTML attribute injection when passing user input as keys to xmlattr filter
Summary: <dev-python/jinja-3.1.3: HTML attribute injection when passing user input as ...
Status: CONFIRMED
Alias: None
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Security
URL:
Whiteboard: B3 [glsa?]
Keywords:
Depends on: 921733
Blocks:
  Show dependency tree
 
Reported: 2024-01-11 04:12 UTC by Michał Górny
Modified: 2024-02-12 02:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-01-11 04:12:17 UTC
The xmlattr filter in affected versions of Jinja accepts keys containing spaces. XML/HTML attributes cannot contain spaces, as each would then be interpreted as 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. Note that accepting keys as user input is not common or a particularly intended use case of the xmlattr filter, and an application doing so should already be verifying what keys are provided regardless of this fix.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-01-11 11:46:31 UTC
cleanup done.