Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

googlechromelabs/critters
main @ 63d2ec8
3
Fixes
1
CVEs
HIGH
Peak severity
Highlights
Cross-Site Scripting (XSS): 1 prior fix. Scrutinize any change in this area.
packages/critters/src/index.js: most-fixed (2 issues). Treat as high-risk during review.
1 high-severity fix in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Path Traversal: Resolving and reading stylesheets from arbitrary locations on the filesystem allows attackers to access sensitive files. The fix enforces that resolved stylesheet paths remain strictly inside the configured output base directory.
Reflected XSS: Inlining CSS containing arbitrary script tags or closing style elements allows attackers to break out of the HTML style context and execute arbitrary client-side code, as tracked in CVE-2023-3481.
Cross-Site Scripting (XSS): When generating noscript fallback elements, failing to sanitize stylesheet URLs can allow an attacker to inject closing noscript tags and execute malicious scripts.