Skip to content

Commit e515aa4

Browse files
jobselkopatchback[bot]
authored andcommitted
Merge pull request #1404 from mdellweg/xss_injection
Validate and autoescape data when rendering html (cherry picked from commit 2dc2355)
1 parent 7123493 commit e515aa4

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎CHANGES/+simple_html_xss.bugfix‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed quoting mistake in simple html index pages that can lead to a possible XSS attack given a carefully crafted package name. CVE-2026-103871

‎pulp_python/app/utils.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ def find_artifact():
542542

543543
def write_simple_index(project_names, streamed=False):
544544
"""Writes the simple index."""
545-
simple = Template(simple_index_template)
545+
simple = Template(simple_index_template, autoescape=True)
546546
context = {
547547
"SIMPLE_API_VERSION": SIMPLE_API_VERSION,
548548
"projects": ((x, canonicalize_name(x)) for x in project_names),

0 commit comments

Comments
 (0)