Technical impact
CGI modules from version 4.62 up to, but not including, 5.00 expose URLs in attributes or script contexts without proper encoding. The vulnerability allows a forged request containing a literal apostrophe or a URL‑encoded %27 to be reflected back to the client exactly as typed, enabling injection of malicious JavaScript when the URL is placed inside a single‑quoted HTML attribute or a JavaScript string. This results in a cross‑site scripting (XSS) vulnerability that can be exploited to steal cookies, session data, or perform other client‑side attacks.
Affected Systems
The affected product is the Perl CGI module (CGI.pm). Versions 4.62 through any pre‑5.00 release (e.g., 4.72, 4.80, 4.99) contain the flaw. Applications that import and use CGI.pm for generating URLs via the url or self_url functions are at risk.
Risk and Exploitability
The CVSS score is 6.1, and the EPSS score is unavailable, but the vulnerability is capable of facilitating script injection in browsers that render the reflected content. Exploitation requires an attacker to craft a URL with an embedded apostrophe and to have the victim load a page that outputs that URL unescaped within a single‑quoted context. Because the flaw is in the library, the attack vector is a standard web request; no privileged access or additional credentials are necessary. The vulnerability is listed as not yet in the CISA KEV catalog, suggesting that widespread exploitation has not been observed at this time, but the potential impact remains high for affected sites that use the CGI functions indiscriminately.