CVE-2026-120635 in CGIinfo

Summary

by MITRE • 11/04/2026

CGI versions before 5.00 for Perl allow form fields to be smuggled past proxies and WAFs via multipart parsing that differs from the RFCs.

The multipart/form-data parser matches the boundary anywhere rather than at the start of a line, uses the boundary without its leading -- for some client-supplied User-Agent values, finds the Content-Disposition name and filename inside the quoted values of other parameters, and corrupts parts when the boundary nears the 4096-byte read size.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 11/04/2026

The vulnerability identified in CGI versions prior to 5.00 for Perl represents a critical parsing discrepancy that undermines security controls designed to inspect HTTP traffic. This flaw stems from an implementation of multipart/form-data parsing that deviates significantly from the standards defined by RFCs, specifically regarding how boundaries are detected and processed within incoming requests. By allowing form fields to be smuggled past proxies and Web Application Firewalls, this vulnerability effectively neutralizes a primary layer of defense against injection attacks, cross-site scripting, and other input-based exploits. The core issue lies in the parser's inability to strictly adhere to protocol specifications, creating an ambiguity that attackers can exploit to bypass content inspection mechanisms that rely on standard parsing logic.

The technical root cause involves several distinct failures in boundary detection and parameter extraction. First, the multipart/form-data parser matches the boundary string anywhere within a line rather than requiring it to appear at the start of a line as mandated by RFC 2046. This lax matching allows attackers to embed malicious payloads or obfuscated data structures that do not trigger standard validation checks because they are hidden within non-standard positions in the HTTP body. Second, for certain client-supplied User-Agent values, the parser incorrectly strips leading dashes from the boundary string. Since boundaries typically begin with two hyphens (--) followed by a unique identifier, this error causes the parser to look for an incorrect delimiter sequence, potentially causing it to miss legitimate parts or misinterpret subsequent data as part of another field.

Furthermore, the vulnerability extends into how Content-Disposition headers are parsed. The CGI module finds the name and filename attributes inside quoted values of other parameters rather than strictly within the Content-Disposition header itself. This behavior violates standard HTTP parsing expectations and can lead to confusion in downstream applications that rely on predictable extraction of file metadata. Additionally, when a boundary string approaches or exceeds 4096 bytes, the parser corrupts parts due to buffer handling issues related to read size limits. This corruption can result in incomplete data transmission or unexpected termination of request processing, which may be leveraged by attackers to cause denial-of-service conditions or to trigger error-based information disclosure that aids further exploitation.

The operational impact of this vulnerability is severe for any system relying on CGI scripts written in Perl to handle file uploads or complex form submissions. Security appliances such as Web Application Firewalls typically parse multipart requests using standard-compliant logic, expecting boundaries at line starts and correct header structures. When the CGI module processes these requests differently, it may accept payloads that the WAF has already inspected and deemed safe, effectively creating a blind spot in the security architecture. Attackers can use this discrepancy to inject malicious scripts, execute arbitrary code via command injection through crafted filenames or parameters, or bypass access controls by manipulating how file names are interpreted. This is particularly dangerous in environments where CGI scripts process user-uploaded files without rigorous server-side validation beyond what the WAF provides.

Mitigation strategies must focus on immediate version upgrades and architectural adjustments. The primary remediation is to upgrade Perl's CGI module to version 5.00 or later, where these parsing inconsistencies have been addressed to align with RFC standards. Until an upgrade can be performed, administrators should implement strict input validation at the application layer rather than relying solely on network-level security controls. This includes validating file types, sizes, and content using allow-lists rather than deny-lists. Additionally, deploying a reverse proxy that normalizes HTTP requests before they reach the backend CGI scripts can help enforce consistent parsing rules, ensuring that all incoming multipart data conforms to expected standards regardless of how the underlying application processes it. Monitoring logs for unusual patterns in Content-Disposition headers or boundary strings may also aid in detecting exploitation attempts during the transition period.

From a classification perspective, this vulnerability aligns with CWE-20 Improper Input Validation and CWE-749 Exposed Dangerous Method or Function due to the misuse of parsing functions that do not enforce strict protocol compliance. In terms of attack vectors, it relates to ATT&CK technique T1505 Server Software Component, specifically Web Shell components if exploited for persistent access, but more directly maps to input validation failures often seen in techniques like T1190 Exploit Public-Facing Application. The ability to bypass WAFs places this vulnerability in the category of evasion tactics where attackers exploit implementation differences between security tools and target applications to achieve unauthorized actions without detection.

Responsible

CPANSec

Reservation

11/02/2026

Disclosure

11/04/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!