CVE-2026-120643
Deferred Deferred - Pending Action

Cross-Site Scripting in Perl CGI Module

Vulnerability report for CVE-2026-120643, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-04

Last updated on: 2026-11-04

Assigner: 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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-04
Last Modified
2026-11-04
Generated
2026-11-08
AI Q&A
2026-11-04
EPSS Evaluated
2026-11-06
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
leejo cgi to 5.00 (exc)
leejo cgi 4.72

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is a cross-site scripting (XSS) issue in CGI.pm versions before 5.00 for Perl. It occurs when the url() and self_url() functions return URLs containing raw apostrophes. The URI canonical method decodes %27 back to an apostrophe, allowing request data to break out of single-quoted HTML attributes or JavaScript strings.

Detection Guidance

To detect this vulnerability, inspect CGI.pm versions in use. Check Perl scripts using CGI.pm for improper URL encoding in url() or self_url() outputs. Look for raw apostrophes in generated URLs that could break out of single-quoted HTML attributes or JavaScript strings.

Impact Analysis

An attacker could exploit this to inject malicious scripts into web pages generated by the application. If the application places the URL in a single-quoted HTML attribute or JavaScript string, the raw apostrophe could break out of the context and execute arbitrary code in the user's browser.

Compliance Impact

This vulnerability primarily enables cross-site scripting (XSS) attacks, which could lead to unauthorized data access or manipulation. For GDPR, this could result in violations of data integrity and confidentiality requirements. HIPAA may be affected if the vulnerability exposes protected health information through XSS attacks.

Mitigation Strategies

Upgrade CGI.pm to version 5.00 or later. Apply the patch from the provided commit to ensure single quotes in URLs are properly percent-encoded as %27 after canonicalization. Test affected applications to confirm URLs are correctly encoded.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-120643. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...