You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bounty proposal] security(iq-rating): script-context breakout in uid and people_data, unescaped exception reflection (5 proposed) #15004
If uid contains '; alert(1); // or </script><script>alert(1)</script>, it breaks out of the JavaScript string literal or closes the HTML <script> element, executing arbitrary JavaScript.
Inline Script Breakout in peopleData JSON Serialization:
In line 1564:
letpeopleData={people_data_json};
In line 1729:
people_json=json.dumps(people_with_iq)
Python's standard json.dumps() does not escape the solidus (/), so strings containing </script> (e.g. within person names, memory transcripts, or nicknames) terminate the enclosing <script> tag and trigger HTML/JS injection.
Unhandled exception messages are interpolated raw into the HTML error response without html.escape().
Proposed Fix
Serialize uid via safe_uid_json = json.dumps(str(uid)).replace('</', '<\\/') and render const uid = {uid_json}; without enclosing single quotes.
Escape closing script tags in people_json via .replace('</', '<\\/').
Wrap exception string formatting with html.escape(str(e)).
Add a hermetic unit test suite in plugins/iq_rating/test_iq_rating_security.py verifying script context breakout prevention, </script> sanitization in uid and people_data, and exception escaping.
Register the new test suite in .github/checks-manifest.yaml.
Activity
kaleidoscopeAI commentedon Sep 19, 2026
/claim #15004
Fixed and verified in PR #15008.
Payment details:
[email protected]fix(iq-rating): prevent script-context breakouts in uid and people_da…
undivisible commentedon Oct 22, 2026
Thanks for putting this together. We aren't doing bounties at the moment, so we're closing the bounty proposal issues for now — thanks for the fix! 🙏