PR to anthropics/skills escapes closing script tags in embedded JSON to fix injection risk

iamLoukik · ghdev · 2026-10-16

A community PR (#2032) against anthropics/skills fixes a script-injection hazard in generatereview.py.

When serialized embedded data contains a literal </script>, browsers interpret it as the end of the inline script element, potentially breaking the generated standalone HTML page and enabling script injection. The fix replaces < with the JSON escape sequence \u003c before embedding.

The author manually verified with a payload of </script><script>window.pwned=1</script> that the output contains no literal closing-script tag; the full test suite has not been run.

Original post →

More from coding & agent

coding & agent channel →