CVE-2026-130593: Scalar scalar-ninja 0.1.0 before 0.3.3 XSS via Inline Configuration Script
Scalar scalar-ninja 0.1.0 before 0.3.3 contains a cross-site scripting vulnerability in getscalarapireference() that embeds unescaped OpenAPI content inside an inline script element. Attackers can supply an OpenAPI document containing a </script><script> sequence in content or sources to execute scripts in the documentation origin for every user viewing the API reference.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 0.3.3
Event History
Frequently Asked Questions
Which scalar-ninja releases are affected, and what version contains the fix?
Versions from 0.1.0 before 0.3.3 are affected. Upgrade to scalar-ninja 0.3.3 or later.
What must an attacker be able to do to exploit this issue?
The attacker must be able to supply an OpenAPI document with a malicious </script><script> sequence in its content or sources. A user must then view the affected API reference.
What is the impact on users who view a malicious API reference?
Attacker-supplied JavaScript can execute in the documentation origin for every user who views that API reference. The reported impact includes low confidentiality and integrity impact, with no availability impact.