Описание
CGI versions before 5.00 for Perl return upload filenames with any client-supplied path, including ../ and Windows paths.
The name returned for an uploaded file is the filename parameter of the part's Content-Disposition header, unchanged.
An application that saves the upload under this name can be made to write outside the intended directory.
A flaw was found in perl-cgi. The module returns client-supplied upload filenames without sanitizing directory traversal sequences or path separators. A remote attacker can exploit this flaw by submitting a file upload with a crafted filename, potentially causing the host application to write files outside the intended destination directory.
Отчет
This vulnerability is rated as Important severity because unauthenticated remote attackers can overwrite arbitrary files with the privileges of the web server process when applications accept file uploads. In Red Hat Enterprise Linux environments, perl-CGI functions as a library rather than an exposed standalone service, meaning exposure is limited to scripts configured to handle multipart form data. Successful attacks require downstream code to directly persist files using the untrusted client-provided filename without independent sanitization or unique name generation.
Меры по смягчению последствий
--- CME Mitigation Guidance (2026-11-04) --- Disclaimer: The following mitigation solutions are provided as a courtesy, pending the application of an official patch. This content was generated utilizing AI tools in conjunction with data from https://cmetaxonomy.org. Customers are advised to independently evaluate and test these temporary mitigations within their own infrastructure. The highest-value action is to sanitize client-supplied upload filenames or canonicalize destination paths before saving files in applications using CGI.pm: upgrade to CGI 5.00+ (or the fixed Perl Cgi builds), which strip control characters and directory segments separated by forward slashes and backslashes from upload filenames, defaulting to 'upload' if no usable name remains, closing all 3 injection vectors (multipart Content-Disposition filenames with relative directory traversal sequences, multipart Content-Disposition filenames with absolute path segments, multipart Content-Disposition filenames with Windows path separators). Until patched, this is a concern on Applications on any platform using CGI.pm to handle multipart/form-data file uploads that save files under the returned filename, so Implement independent path sanitization or canonicalization in application code to ensure destination paths remain strictly confined to designated upload directories before saving files. As a compensating measure, Inspect HTTP multipart/form-data payloads with a web application firewall to detect and block traversal sequences inside the Content-Disposition filename parameter, Log kernel-level filesystem write events using auditd to provide forensic visibility when files are created outside the intended upload directory, Monitor file-system write operations with Falco or eBPF runtime security to alert on unexpected file creation outside standard upload directories by the web process, and Deploy file integrity monitoring such as AIDE to detect unauthorized creation or modification of critical system files resulting from traversal writes. These controls limit blast radius and contain exploitation, but they do not fix the underlying path traversal vulnerability — apply the upstream patch to fully remediate. Highest-impact CME: CME-1301 Path Traversal Prevention (Canonicalization) (high)
Затронутые пакеты
| Платформа | Пакет | Состояние | Рекомендация | Релиз |
|---|---|---|---|---|
| Red Hat Enterprise Linux 7 | perl-CGI | Affected | ||
| Red Hat Enterprise Linux 10 | perl-CGI | Fixed | RHSA-2026:99212 | 11.11.2026 |
| Red Hat Enterprise Linux 10.2 Extended Update Support | perl-CGI | Fixed | RHSA-2026:99214 | 11.11.2026 |
| Red Hat Enterprise Linux 8 | perl-CGI | Fixed | RHSA-2026:99849 | 12.11.2026 |
| Red Hat Enterprise Linux 9 | perl-CGI | Fixed | RHSA-2026:99215 | 12.11.2026 |
| Red Hat Enterprise Linux 9.8 Extended Update Support | perl-CGI | Fixed | RHSA-2026:99213 | 12.11.2026 |
Показывать по
Ссылки на источники
Дополнительная информация
Статус:
7.5 High
CVSS3
Связанные уязвимости
CGI versions before 5.00 for Perl return upload filenames with any client-supplied path, including ../ and Windows paths. The name returned for an uploaded file is the filename parameter of the part's Content-Disposition header, unchanged. An application that saves the upload under this name can be made to write outside the intended directory.
CGI versions before 5.00 for Perl return upload filenames with any client-supplied path, including ../ and Windows paths. The name returned for an uploaded file is the filename parameter of the part's Content-Disposition header, unchanged. An application that saves the upload under this name can be made to write outside the intended directory.
CGI versions before 5.00 for Perl return upload filenames with any client-supplied path, including ../ and Windows paths
CGI versions before 5.00 for Perl return upload filenames with any cli ...
CGI versions before 5.00 for Perl return upload filenames with any client-supplied path, including ../ and Windows paths. The name returned for an uploaded file is the filename parameter of the part's Content-Disposition header, unchanged. An application that saves the upload under this name can be made to write outside the intended directory.
7.5 High
CVSS3