From d41ba42d82c4dc1be5ea7e0f9a0804fc2638d35f Mon Sep 17 00:00:00 2001 From: tuanaiseo Date: Sat, 4 Apr 2026 22:46:33 +0700 Subject: [PATCH] fix(security): potential xss via unescaped template variables inj The template disables autoescaping and injects user-influenced values (such as `cdx.url`, `top_url`, `coll`, and others) directly into JavaScript string literals. If any value contains quotes, backslashes, or script-breaking payloads, it can execute arbitrary JavaScript in the replay UI. Affected files: head_insert.html Signed-off-by: tuanaiseo <221258316+tuanaiseo@users.noreply.github.com> --- pywb/templates/head_insert.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/pywb/templates/head_insert.html b/pywb/templates/head_insert.html index 11cf0f1e..72b388b4 100644 --- a/pywb/templates/head_insert.html +++ b/pywb/templates/head_insert.html @@ -4,7 +4,7 @@ @@ -37,10 +37,10 @@ {% if not wb_url.is_banner_only or (env.pywb_proxy_magic and (config.enable_auto_fetch or config.proxy.enable_wombat)) %}