CVE-2025-40907 FCGI versions 0.44 through 0.82, for Perl, include a vulnerable version of the FastCGI fcgi2 (aka fcgi) library

Medium 5.3 Published Updated

An integer overflow in the Perl FCGI library allows attackers to trigger a heap-based buffer overflow via crafted IPC socket data, potentially leading to code execution or denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-40907?

CVE-2025-40907 is a medium-severity vulnerability in ETHER FCGI, published on 16 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

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.

Weakness: CWE-190, CWE-1395, CWE-122

Which versions are affected by CVE-2025-40907?

It affects 1 product.

Linux distribution packages (40)
perl-FCGI AlmaLinux:10All versions1:0.82-13.1.el10_0
perl-FCGI AlmaLinux:8All versions1:0.78-12.module_el8.10.0+4011+62915be2
perl-FCGI AlmaLinux:8All versions1:0.78-12.module_el8.10.0+4012+cd64a238
perl-FCGI AlmaLinux:8All versions1:0.78-12.module_el8.10.0+4013+e6a7e623
perl-FCGI AlmaLinux:9All versions1:0.79-8.1.el9_6
perl-FCGI Red Hat:enterprise_linux:10.0All versions1:0.82-13.1.el10_0
perl-FCGI-debuginfo Red Hat:enterprise_linux:10.0All versions1:0.82-13.1.el10_0
perl-FCGI-debugsource Red Hat:enterprise_linux:10.0All versions1:0.82-13.1.el10_0
perl-FCGI Red Hat:enterprise_linux:8::appstreamAll versions1:0.78-12.module+el8.10.0+23147+df114ff4
perl-FCGI-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions1:0.78-12.module+el8.10.0+23147+df114ff4
perl-FCGI-debugsource Red Hat:enterprise_linux:8::appstreamAll versions1:0.78-12.module+el8.10.0+23147+df114ff4
perl-FCGI Red Hat:enterprise_linux:9::appstreamAll versions1:0.79-8.1.el9_6
perl-FCGI-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions1:0.79-8.1.el9_6
perl-FCGI-debugsource Red Hat:enterprise_linux:9::appstreamAll versions1:0.79-8.1.el9_6
perl-FCGI Red Hat:rhel_aus:8.2::appstreamAll versions1:0.78-11.module+el8.2.0+23234+edafdda3.1
perl-FCGI-debuginfo Red Hat:rhel_aus:8.2::appstreamAll versions1:0.78-11.module+el8.2.0+23234+edafdda3.1
perl-FCGI-debugsource Red Hat:rhel_aus:8.2::appstreamAll versions1:0.78-11.module+el8.2.0+23234+edafdda3.1
perl-FCGI Red Hat:rhel_aus:8.4::appstreamAll versions1:0.78-11.module+el8.4.0+23229+35c4aba7.1
perl-FCGI-debuginfo Red Hat:rhel_aus:8.4::appstreamAll versions1:0.78-11.module+el8.4.0+23229+35c4aba7.1
perl-FCGI-debugsource Red Hat:rhel_aus:8.4::appstreamAll versions1:0.78-11.module+el8.4.0+23229+35c4aba7.1
perl-FCGI Red Hat:rhel_aus:8.6::appstreamAll versions1:0.78-11.module+el8.6.0+23193+c3786137.1
perl-FCGI-debuginfo Red Hat:rhel_aus:8.6::appstreamAll versions1:0.78-11.module+el8.6.0+23193+c3786137.1
perl-FCGI-debugsource Red Hat:rhel_aus:8.6::appstreamAll versions1:0.78-11.module+el8.6.0+23193+c3786137.1
perl-FCGI Red Hat:rhel_e4s:8.6::appstreamAll versions1:0.78-11.module+el8.6.0+23193+c3786137.1
perl-FCGI-debuginfo Red Hat:rhel_e4s:8.6::appstreamAll versions1:0.78-11.module+el8.6.0+23193+c3786137.1
perl-FCGI-debugsource Red Hat:rhel_e4s:8.6::appstreamAll versions1:0.78-11.module+el8.6.0+23193+c3786137.1
perl-FCGI Red Hat:rhel_e4s:8.8::appstreamAll versions1:0.78-11.module+el8.8.0+23188+f6366248.1
perl-FCGI-debuginfo Red Hat:rhel_e4s:8.8::appstreamAll versions1:0.78-11.module+el8.8.0+23188+f6366248.1
perl-FCGI-debugsource Red Hat:rhel_e4s:8.8::appstreamAll versions1:0.78-11.module+el8.8.0+23188+f6366248.1
perl-FCGI Red Hat:rhel_e4s:9.0::appstreamAll versions1:0.79-8.el9_0.1
perl-FCGI-debuginfo Red Hat:rhel_e4s:9.0::appstreamAll versions1:0.79-8.el9_0.1
perl-FCGI-debugsource Red Hat:rhel_e4s:9.0::appstreamAll versions1:0.79-8.el9_0.1
perl-FCGI Red Hat:rhel_e4s:9.2::appstreamAll versions1:0.79-8.el9_2.1
perl-FCGI-debuginfo Red Hat:rhel_e4s:9.2::appstreamAll versions1:0.79-8.el9_2.1
perl-FCGI-debugsource Red Hat:rhel_e4s:9.2::appstreamAll versions1:0.79-8.el9_2.1
perl-FCGI Red Hat:rhel_els:7All versions1:0.74-8.el7_9.1
perl-FCGI-debuginfo Red Hat:rhel_els:7All versions1:0.74-8.el7_9.1
perl-FCGI Red Hat:rhel_eus:9.4::appstreamAll versions1:0.79-8.el9_4.1
perl-FCGI-debuginfo Red Hat:rhel_eus:9.4::appstreamAll versions1:0.79-8.el9_4.1
perl-FCGI-debugsource Red Hat:rhel_eus:9.4::appstreamAll versions1:0.79-8.el9_4.1

Products include Fastcgi Fcgi.

How do I fix CVE-2025-40907?

Upgrade to a fixed version.

Is CVE-2025-40907 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-40907 exists.

Sources

Also known as ALSA-2025:8635, ALSA-2025:8636, ALSA-2025:8696, AZL-61899, AZL-61905, CLSA-2025-1762958433 and 21 more.

Is CVE-2025-40907 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free