CVE-2025-40907FCGI versions 0.44 through 0.82, for Perl, include a vulnerable version of the FastCGI…
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.
What to do
Fixed builds are available from AlmaLinux, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | libfcgi-perl | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | libfcgi-perl | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | libfcgi-perl | Fixed | 0.79-1ubuntu0.1 | UBUNTU-CVE-2025-40907 |
| Ubuntu 18.04 | libfcgi-perl | Fix pending | 0.78-2ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2025-40907 |
| Ubuntu 16.04 | libfcgi-perl | Fix pending | 0.77-1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2025-40907 |
| Debian 14 | libfcgi-perl | Fixed | 0.79+ds-2 | DEBIAN-CVE-2025-40907 |
| Debian 13 | libfcgi-perl | Fixed | 0.79+ds-2 | DEBIAN-CVE-2025-40907 |
| Debian 12 | libfcgi-perl | Fixed | 0.79+ds-2 | DEBIAN-CVE-2025-40907 |
| Red Hat Enterprise Linux 10 | perl-FCGI | Fixed | 1:0.82-13.1.el10_0 | RHSA-2025:8636 |
| Red Hat Enterprise Linux 9 | perl-FCGI | Fixed | 1:0.79-8.1.el9_6 | RHSA-2025:8635 |
| Red Hat Enterprise Linux 8 | perl-FCGI | Fixed | 1:0.78-12.module+el8.10.0+23147+df114ff4 | RHSA-2025:8696 |
| AlmaLinux 10 | perl-FCGI | Fixed | 1:0.82-13.1.el10_0 | ALSA-2025:8636 |
| AlmaLinux 9 | perl-FCGI | Fixed | 1:0.79-8.1.el9_6 | ALSA-2025:8635 |
| AlmaLinux 8 | perl-FCGI | Fixed | 1:0.78-12.module_el8.10.0+4011+62915be2 | ALSA-2025:8696 |
| Rocky Linux 10 | perl-FCGI | Fixed | 1:0.82-13.1.el10_0 | RLSA-2025:8636 |
| Rocky Linux 9 | perl-FCGI | Fixed | 1:0.79-8.1.el9_6 | RLSA-2025:8635 |
| Rocky Linux 8 | perl-FCGI | Fixed | 1:0.78-12.module+el8.10.0+1990+d30a9ea8 | RLSA-2025:8696 |
What the vendor says
As published in the CVE record by CPANSec, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- ETHER FCGI: affected: 0.44 to 0.82
Workaround: Updating to version 2.4.5 of the included fcgi2 library and rebuilding the Perl module will protect against the vulnerability. We also recommend limiting potential remote access to the FastCGI socket by declaring it as a UNIX socket.
Vendor advisories:
- https://github.com/FastCGI-Archives/fcgi2/releases/tag/2.4.5 (patch)
- https://patch-diff.githubusercontent.com/raw/FastCGI-Archives/fcgi2/pull/74.patch (patch)
References
- http://www.openwall.com/lists/oss-security/2025/04/23/4
- https://github.com/FastCGI-Archives/fcgi2/issues/67
- https://github.com/FastCGI-Archives/fcgi2/releases/tag/2.4.5
- https://www.synacktiv.com/en/publications/cve-2025-23016-exploiting-the-fastcgi-library
- https://github.com/perl-catalyst/FCGI/issues/14
- https://patch-diff.githubusercontent.com/raw/FastCGI-Archives/fcgi2/pull/74.patch
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.