CVSS 3.1
5.3 mediumCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LMedium (5.3) in fastcgi fcgi. EPSS 0.7% estimated probability of exploitation activity in the next 30 days.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LExplain CVE-2025-40907 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-40907?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-40907?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-40907 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
From the CNA's record in the CVE List.
| Product | Affected |
|---|---|
| ETHER FCGI | from 0.44 through 0.82 |
| Distribution | Release | Package | Fixed in | Advisory |
|---|---|---|---|---|
| Debian | 12, 13, 14 | libfcgi-perl | 0.79+ds-2 | DEBIAN-CVE-2025-40907 |
| Ubuntu | 20.04:LTS | libfcgi-perl | 0.79-1ubuntu0.1 | UBUNTU-CVE-2025-40907 USN-7527-1 |
| Ubuntu | Pro:16.04:LTS | libfcgi-perl | 0.77-1ubuntu0.1~esm1 | UBUNTU-CVE-2025-40907 USN-7527-1 |
| Ubuntu | Pro:18.04:LTS | libfcgi-perl | 0.78-2ubuntu0.1~esm1 | UBUNTU-CVE-2025-40907 USN-7527-1 |
| Red Hat | enterprise_linux:8::appstream | perl-FCGI, perl-FCGI-debuginfo, perl-FCGI-debugsource | 1:0.78-12.module+el8.10.0+23147+df114ff4 | RHSA-2025:8696 |
| Red Hat | enterprise_linux:9::appstream | perl-FCGI, perl-FCGI-debuginfo, perl-FCGI-debugsource | 1:0.79-8.1.el9_6 | RHSA-2025:8635 |
| Red Hat | enterprise_linux:10.0 | perl-FCGI, perl-FCGI-debuginfo, perl-FCGI-debugsource | 1:0.82-13.1.el10_0 | RHSA-2025:8636 |
| Red Hat | rhel_aus:8.2::appstream | perl-FCGI, perl-FCGI-debuginfo, perl-FCGI-debugsource | 1:0.78-11.module+el8.2.0+23234+edafdda3.1 | RHSA-2025:8829 |
| Red Hat | rhel_aus:8.4::appstream | perl-FCGI, perl-FCGI-debuginfo, perl-FCGI-debugsource | 1:0.78-11.module+el8.4.0+23229+35c4aba7.1 | RHSA-2025:8703 |
| Red Hat | rhel_aus:8.6::appstream, rhel_e4s:8.6::appstream, rhel_tus:8.6::appstream | perl-FCGI, perl-FCGI-debuginfo, perl-FCGI-debugsource | 1:0.78-11.module+el8.6.0+23193+c3786137.1 | RHSA-2025:8890 |
| Red Hat | rhel_e4s:8.8::appstream, rhel_tus:8.8::appstream | perl-FCGI, perl-FCGI-debuginfo, perl-FCGI-debugsource | 1:0.78-11.module+el8.8.0+23188+f6366248.1 | RHSA-2025:8698 |
| Red Hat | rhel_e4s:9.0::appstream | perl-FCGI, perl-FCGI-debuginfo, perl-FCGI-debugsource | 1:0.79-8.el9_0.1 | RHSA-2025:8678 |
| Red Hat | rhel_e4s:9.2::appstream | perl-FCGI, perl-FCGI-debuginfo, perl-FCGI-debugsource | 1:0.79-8.el9_2.1 | RHSA-2025:8697 |
| Red Hat | rhel_els:7 | perl-FCGI, perl-FCGI-debuginfo | 1:0.74-8.el7_9.1 | RHSA-2025:8625 |
| Red Hat | rhel_eus:9.4::appstream | perl-FCGI, perl-FCGI-debuginfo, perl-FCGI-debugsource | 1:0.79-8.el9_4.1 | RHSA-2025:8677 |
| AlmaLinux | 8 | perl-FCGI | 1:0.78-12.module_el8.10.0+4011+62915be2 | 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+4013+e6a7e623 | ALSA-2025:8696 |
| AlmaLinux | 9 | perl-FCGI | 1:0.79-8.1.el9_6 | ALSA-2025:8635 |
| AlmaLinux | 10 | perl-FCGI | 1:0.82-13.1.el10_0 | ALSA-2025:8636 |
| Rocky Linux | 8 | perl-FCGI | 1:0.78-12.module+el8.10.0+1990+6591fbc7 | RLSA-2025:8696 |
| 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 | 9 | perl-FCGI | 1:0.79-8.1.el9_6 | RLSA-2025:8635 |
| Rocky Linux | 10 | perl-FCGI | 1:0.82-13.1.el10_0 | RLSA-2025:8636 |
| Azure Linux | 2 | perl-FCGI | no fix listed | AZL-61905 |
| Azure Linux | 3 | perl-FCGI | no fix listed | AZL-61899 |
From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat.
Red Hat rates this Important.
This vulnerability is Important rather than just a Moderate flaw because it stems from an integer overflow in the allocation size calculation during parameter parsing in the FastCGI implementation. When the application processes incoming FastCGI parameters, it calculates the total size of memory to allocate by adding the name and value lengths along with two additional bytes. On 32-bit systems, this arithmetic operation can wrap around (due to the limited 32-bit size of size_t), leading to a significantly smaller allocation than intended. However, subsequent calls to FCGX_GetStr use the original (large) lengths provided by the attacker and write far beyond the allocated memory region (heap overflow). Unlike a moderate vulnerability (e.g., memory leak or a simple read out-of-bounds), this heap overflow directly allows an attacker to overwrite adjacent memory in the heap in a controlled way, potentially leading to arbitrary code execution, data corruption, or privilege escalation.
No mitigation is currently available that meets Red Hat Product Security’s standards for usability, deployment, applicability, or stability.
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | perl-FCGI-1:0.82-13.1.el10_0 | Fixed 2025-06-09 | RHSA-2025:8636 |
| Red Hat Enterprise Linux 7 Extended Lifecycle Support | perl-FCGI-1:0.74-8.el7_9.1 | Fixed 2025-06-09 | RHSA-2025:8625 |
| Red Hat Enterprise Linux 8 | perl-FCGI:0.78-8100020250529111022.491cfe3d | Fixed 2025-06-09 | RHSA-2025:8696 |
| Red Hat Enterprise Linux 8.2 Advanced Update Support | perl-FCGI:0.78-8020020250607180124.89a48cc6 | Fixed 2025-06-11 | RHSA-2025:8829 |
| Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support | perl-FCGI:0.78-8040020250606192145.18ae627e | Fixed 2025-06-09 | RHSA-2025:8703 |
| Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support | perl-FCGI:0.78-8060020250604201935.513b2a65 | Fixed 2025-06-11 | RHSA-2025:8890 |
| Red Hat Enterprise Linux 8.6 Telecommunications Update Service | perl-FCGI:0.78-8060020250604201935.513b2a65 | Fixed 2025-06-11 | RHSA-2025:8890 |
| Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions | perl-FCGI:0.78-8060020250604201935.513b2a65 | Fixed 2025-06-11 | RHSA-2025:8890 |
| Red Hat Enterprise Linux 8.8 Telecommunications Update Service | perl-FCGI:0.78-8080020250603232512.6ceb32a8 | Fixed 2025-06-09 | RHSA-2025:8698 |
| Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions | perl-FCGI:0.78-8080020250603232512.6ceb32a8 | Fixed 2025-06-09 | RHSA-2025:8698 |
| Red Hat Enterprise Linux 9 | perl-FCGI-1:0.79-8.1.el9_6 | Fixed 2025-06-09 | RHSA-2025:8635 |
| Red Hat Enterprise Linux 9.0 Update Services for SAP Solutions | perl-FCGI-1:0.79-8.el9_0.1 | Fixed 2025-06-09 | RHSA-2025:8678 |
| Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions | perl-FCGI-1:0.79-8.el9_2.1 | Fixed 2025-06-09 | RHSA-2025:8697 |
| Red Hat Enterprise Linux 9.4 Extended Update Support | perl-FCGI-1:0.79-8.el9_4.1 | Fixed 2025-06-09 | RHSA-2025:8677 |
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-40907.
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.