Skip to content

Commit dc7e82e

Browse files
committed
Merge pull request #1404 from mdellweg/xss_injection
Validate and autoescape data when rendering html (cherry picked from commit 2dc2355)
1 parent cf0b6d2 commit dc7e82e

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
@@ -303,7 +303,7 @@ def find_artifact():
303303

304304
def write_simple_index(project_names, streamed=False):
305305
"""Writes the simple index."""
306-
simple = Template(simple_index_template)
306+
simple = Template(simple_index_template, autoescape=True)
307307
context = {"projects": ((x, canonicalize_name(x)) for x in project_names)}
308308
return simple.stream(**context) if streamed else simple.render(**context)
309309

0 commit comments

Comments
 (0)