# CVE-2026-120643: CGI versions from 4.62 before 5.00 for Perl allow cross-site scripting via a raw apostrophe in URLs returned by url and self_url

- Severity: Medium 6.1 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.32%, higher than 26% of CVEs (2026-12-01)
- Published: 2026-11-03T23:40:48.770Z
- Modified: 2026-11-09T20:18:06.357Z
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: CPANSec

## Description

CGI versions from 4.62 before 5.00 for Perl allow cross-site scripting via a raw apostrophe in URLs returned by url and self_url.

Both pass the URL through URI's canonical method, which leaves an apostrophe in the path raw and decodes the %27 that query parameter escaping produces, so an apostrophe in the request path or a parameter appears raw in the result.

An application that places the URL in a single-quoted HTML attribute or JavaScript string is open to cross-site scripting.

(As written by CVE List.)

## Affected

- CGI: from 4.62 before 5.00

## References

- <https://metacpan.org/release/LEEJO/CGI-4.72/source/lib/CGI.pm> (technical-description)
- <https://metacpan.org/release/LEEJO/CGI-5.00/changes> (release-notes)
- <https://github.com/leejo/CGI.pm/commit/851430be84c4d0f350681814e1d7718b9959f2c2.patch> (patch)

## Sources

- CVE List: [CVE-2026-120643](https://www.cve.org/CVERecord?id=CVE-2026-120643), CVE Terms of Use, modified 2026-11-09
- NVD: [CVE-2026-120643](https://nvd.nist.gov/vuln/detail/CVE-2026-120643), Public domain, modified 2026-11-09

---

Page: https://cve.day/CVE-2026-120643 · Whole record: https://cve.day/CVE-2026-120643.json · Rebuilt by cve.day 2026-11-25T22:59:48.945Z
