CVE-2025-40907: Libfcgi perl · FCGI versions 0.44 through 0.82, for Perl, include a vulnerable version of the FastCGI
Affects libfcgi-perlSource GCVE Database
Mentioned vulnerabilities
Not known to be exploited · CVSS 5.3 Medium · fixed in 0.77-1ubuntu0.1~esm1 : update libfcgi-perl when convenient.
Data as of 24 Nov 2026, 21:15 UTC
- EPSS
- 0.6% chance of exploitation in 30 days – higher than 53% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 0.77-1ubuntu0.1~esm1, 0.78-2ubuntu0.1~esm1, 0.79-1ubuntu0.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LExploitation evidence
Disclosed: evidence found.
CVE published 16 May 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 24 Nov 2026.
What to do
Upgrade the Ubuntu libfcgi-perl to 0.77-1ubuntu0.1~esm1 (package) or 0.78-2ubuntu0.1~esm1 (package) or 0.79-1ubuntu0.1 (package).
Patches and advisories
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 20.04 LTSlibfcgi-perlpkg:deb/ubuntu/libfcgi-perl?arch=source&distro=focalOther threats | Affected
| Fixed in
|
Ubuntu Pro 18.04 LTSlibfcgi-perlpkg:deb/ubuntu/libfcgi-perl?arch=source&distro=esm-infra/bionicOther threats | Affected
| Fixed in
|
Ubuntu Pro 16.04 LTSlibfcgi-perlpkg:deb/ubuntu/libfcgi-perl?arch=source&distro=esm-infra/xenialOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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.
References
- ubuntu.com/security/CVE-2025-40907 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2025-40907 (opens in a new tab)
- lists.security.metacpan.org/cve-announce/msg/29651740/ (opens in a new tab)
- openwall.com/lists/oss-security/2025/04/23/4 (opens in a new tab)
- github.com/FastCGI-Archives/fcgi2/issues/67 (opens in a new tab)
- github.com/FastCGI-Archives/fcgi2/releases/tag/2.4.5 (opens in a new tab)
- github.com/perl-catalyst/FCGI/issues/14 (opens in a new tab)
- patch-diff.githubusercontent.com/raw/FastCGI-Archives/fcgi2/pull/74.patch (opens in a new tab)
- synacktiv.com/en/publications/cve-2025-23016-exploiting-the-fastcgi-library (opens in a new tab)
- ubuntu.com/security/notices/USN-7527-1 (opens in a new tab)