CVEfocus › CVE database › CVE-2025-40907

CVE-2025-40907FCGI versions 0.44 through 0.82, for Perl, include a vulnerable version of the FastCGI…

CVSS 5.3 MediumEPSS 0.7% (higher than 53% of CVEs)Published 2025-05-16Updated 2025-09-05Assigner: CPANSec

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.

CWE-122CWE-1395CWE-190

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

13Fixed
2Fix pending
2Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04libfcgi-perlNot affected
vulnerable_code_not_present
Ubuntu 22.04libfcgi-perlNot affected
vulnerable_code_not_present
Ubuntu 20.04libfcgi-perlFixed0.79-1ubuntu0.1UBUNTU-CVE-2025-40907
Ubuntu 18.04libfcgi-perlFix pending0.78-2ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2025-40907
Ubuntu 16.04libfcgi-perlFix pending0.77-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2025-40907
Debian 14libfcgi-perlFixed0.79+ds-2DEBIAN-CVE-2025-40907
Debian 13libfcgi-perlFixed0.79+ds-2DEBIAN-CVE-2025-40907
Debian 12libfcgi-perlFixed0.79+ds-2DEBIAN-CVE-2025-40907
Red Hat Enterprise Linux 10perl-FCGIFixed1:0.82-13.1.el10_0RHSA-2025:8636
Red Hat Enterprise Linux 9perl-FCGIFixed1:0.79-8.1.el9_6RHSA-2025:8635
Red Hat Enterprise Linux 8perl-FCGIFixed1:0.78-12.module+el8.10.0+23147+df114ff4RHSA-2025:8696
AlmaLinux 10perl-FCGIFixed1:0.82-13.1.el10_0ALSA-2025:8636
AlmaLinux 9perl-FCGIFixed1:0.79-8.1.el9_6ALSA-2025:8635
AlmaLinux 8perl-FCGIFixed1:0.78-12.module_el8.10.0+4011+62915be2ALSA-2025:8696
Rocky Linux 10perl-FCGIFixed1:0.82-13.1.el10_0RLSA-2025:8636
Rocky Linux 9perl-FCGIFixed1:0.79-8.1.el9_6RLSA-2025:8635
Rocky Linux 8perl-FCGIFixed1:0.78-12.module+el8.10.0+1990+d30a9ea8RLSA-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.

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:

References

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.