-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Short summary
A client-side search feature consumed a generated search.json and rendered results by injecting HTML strings. If search.json contains malicious content, a visitor using search could execute arbitrary JavaScript in the site origin. This is a high-impact vulnerability and should be fixed and CI‑checked immediately.
Fix applied (summary)
search.jsongeneration: fields serialized with Liquidjsonifyto produce valid, safe JSON.src/js/simpleJekyllSearch.js: switched from string-based templating to DOM construction withtextContentto avoid HTML parsing of untrusted values.src/js/target_blank.js: addedrel="noopener noreferrer"for external links to prevent reverse tabnabbing.
Verification (quick commands)
- Manual PoC test: create malicious
search.jsonand openpoc-search-xss.html. - Run the verification scripts added in
scripts/:
# run these from repo root
node scripts/check_search_json.js
node scripts/check_target_blank_rel.js .Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels