Technical impact
The vulnerability in Scalar scalar‑ninja is a cross‑site scripting flaw that allows an attacker to inject arbitrary JavaScript by supplying unescaped title values in a ScalarConfig file. By closing the title element with </title> and appending a <script> tag, the attacker can embed code that runs in the documentation origin for any user who views the affected API reference pages. The flaw is a CWE‑79.
Affected Systems
Scalar‑ninja versions beginning with 0.1.0 up to, but not including, 0.3.3 retain the vulnerable code paths. The product is provided by Scalar under the scalar‑ninja branding. Upgrading to version 0.3.3 or higher removes the insecure title handling and resolves the issue.
Risk and Exploitability
The CVSS score of 5.1 indicates a moderate level of severity, reflecting the requirement for an attacker to influence configuration data but granting only client‑side script execution. The EPSS score is currently unavailable, and the vulnerability is not listed in CISA’s KEV catalog, suggesting no documented large‑scale exploitation yet. Because the flaw depends on the presence of untrusted title content in a configuration file, the likely attack vector is an attacker who can modify or replace that configuration before it is served to visitors of the API documentation.