Vulnerability · Published May 16, 2025 · Assigned by CPANSec
CVE-2025-40907FCGI versions 0.44 through 0.82, for Perl, include a vulnerable version of the FastCGI fcgi2 (aka fcgi) library
Medium 5.3
In plain English
A medium-severity integer overflow in FCGI from ETHER. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 52% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
FCGI versions 0.44 through 0.82, for Perl, include a vulnerable version of the FastCGI fcgi2 (aka fcgi) library. The included FastCGI library is affected by CVE-2025-23016, causing an integer overflow (and resultant heap-based buffer overflow) via crafted nameLen or valueLen values in data to the IPC socket. This occurs in ReadParams in fcgiapp.c.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:10 | perl-FCGI | 1:0.82-13.1.el10_0 | ALSA-2025:8636 |
| AlmaLinux:8 | perl-FCGI | 1:0.78-12.module_el8.10.0+4013+e6a7e623 | ALSA-2025:8696 |
| AlmaLinux:8 | perl-FCGI | 1:0.78-12.module_el8.10.0+4012+cd64a238 | ALSA-2025:8696 |
| AlmaLinux:8 | perl-FCGI | 1:0.78-12.module_el8.10.0+4011+62915be2 | ALSA-2025:8696 |
| AlmaLinux:9 | perl-FCGI | 1:0.79-8.1.el9_6 | ALSA-2025:8635 |
| Debian:12 | libfcgi-perl | 0.79+ds-2 | DEBIAN-CVE-2025-40907 |
| Debian:13 | libfcgi-perl | 0.79+ds-2 | DEBIAN-CVE-2025-40907 |
| Debian:14 | libfcgi-perl | 0.79+ds-2 | DEBIAN-CVE-2025-40907 |
| Rocky Linux:10 | perl-FCGI | 1:0.82-13.1.el10_0 | RLSA-2025:8636 |
| Rocky Linux:8 | perl-FCGI | 1:0.78-12.module+el8.10.0+1990+7f517b07 | RLSA-2025:8696 |
| Rocky Linux:8 | perl-FCGI | 1:0.78-12.module+el8.10.0+1990+99c43398 | RLSA-2025:8696 |
| Rocky Linux:8 | perl-FCGI | 1:0.78-12.module+el8.10.0+1990+d30a9ea8 | RLSA-2025:8696 |
| Rocky Linux:8 | perl-FCGI | 1:0.78-12.module+el8.10.0+1990+6591fbc7 | RLSA-2025:8696 |
| Rocky Linux:9 | perl-FCGI | 1:0.79-8.1.el9_6 | RLSA-2025:8635 |
Affected products (as reported)
Weakness: CWE-1395, CWE-190, CWE-122 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
References
- http://www.openwall.com/lists/oss-security/2025/04/23/4 mailing-list
- https://github.com/FastCGI-Archives/fcgi2/issues/67 issue-tracking
- https://github.com/FastCGI-Archives/fcgi2/releases/tag/2.4.5 patch
- https://www.synacktiv.com/en/publications/cve-2025-23016-exploiting-the-fastcgi-library technical-description
- https://github.com/perl-catalyst/FCGI/issues/14 issue-tracking
- https://patch-diff.githubusercontent.com/raw/FastCGI-Archives/fcgi2/pull/74.patch patch