CVE-2024-40725 Apache HTTP Server: source code disclosure with handlers configured via AddType

Medium 5.3 Published Updated

Attackers can disclose source code of local content, such as PHP scripts, when handlers are configured via AddType in Apache HTTP Server.

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

What is CVE-2024-40725?

CVE-2024-40725 is a medium-severity vulnerability in Apache Http Server, published on 18 Jul 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A partial fix for  CVE-2024-39884 in the core of Apache HTTP Server 2.4.61 ignores some use of the legacy content-type based configuration of handlers. "AddType" and similar configuration, under some circumstances where files are requested indirectly, result in source code disclosure of local content. For example, PHP scripts may be served instead of interpreted.

Users are recommended to upgrade to version 2.4.62, which fixes this issue.

Weakness: CWE-668

Which versions are affected by CVE-2024-40725?

1 open source package ship an affected version, including apache. It affects 1 product.

PackageAffectedFixed in
apache BitnamiFrom 2.4.602.4.62
Linux distribution packages (31)
apache2 SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOSAll versions2.4.51-150400.6.37.1
apache2 SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSSAll versions2.4.51-150400.6.37.1
apache2 SUSE:Linux Enterprise Module for Basesystem 15 SP5All versions2.4.51-150400.6.37.1
apache2 SUSE:Linux Enterprise Module for Basesystem 15 SP6All versions2.4.58-150600.5.26.1
apache2-prefork SUSE:Linux Enterprise Module for Basesystem 15 SP6All versions2.4.58-150600.5.26.1
apache2 SUSE:Linux Enterprise Module for Package Hub 15 SP5All versions2.4.51-150400.6.37.1
apache2 SUSE:Linux Enterprise Module for Package Hub 15 SP6All versions2.4.58-150600.5.26.1
apache2-event SUSE:Linux Enterprise Module for Package Hub 15 SP6All versions2.4.58-150600.5.26.1
apache2 SUSE:Linux Enterprise Module for Server Applications 15 SP5All versions2.4.51-150400.6.37.1
apache2 SUSE:Linux Enterprise Module for Server Applications 15 SP6All versions2.4.51-150400.6.37.1
apache2-devel SUSE:Linux Enterprise Module for Server Applications 15 SP6All versions2.4.58-150600.5.26.1
apache2-utils SUSE:Linux Enterprise Module for Server Applications 15 SP6All versions2.4.58-150600.5.26.1
apache2-worker SUSE:Linux Enterprise Module for Server Applications 15 SP6All versions2.4.58-150600.5.26.1
apache2 SUSE:Linux Enterprise Server 12 SP5-LTSSAll versions2.4.51-35.63.1
apache2-tls13 SUSE:Linux Enterprise Server 12 SP5-LTSSAll versions2.4.51-35.63.1
apache2 SUSE:Linux Enterprise Server 15 SP4-LTSSAll versions2.4.51-150400.6.37.1
apache2 SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5All versions2.4.51-35.63.1
apache2-tls13 SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5All versions2.4.51-35.63.1
apache2 SUSE:Linux Enterprise Server for SAP Applications 12 SP5All versions2.4.51-35.63.1
apache2-tls13 SUSE:Linux Enterprise Server for SAP Applications 12 SP5All versions2.4.51-35.63.1
apache2 SUSE:Linux Enterprise Server for SAP Applications 15 SP4All versions2.4.51-150400.6.37.1
apache2 SUSE:Manager Proxy 4.3All versions2.4.51-150400.6.37.1
apache2 SUSE:Manager Server 4.3All versions2.4.51-150400.6.37.1
apache2 openSUSE:Leap 15.5All versions2.4.51-150400.6.37.1
apache2 openSUSE:Leap 15.6All versions2.4.58-150600.5.26.1
apache2-devel openSUSE:Leap 15.6All versions2.4.58-150600.5.26.1
apache2-event openSUSE:Leap 15.6All versions2.4.58-150600.5.26.1
apache2-manual openSUSE:Leap 15.6All versions2.4.58-150600.5.26.1
apache2-prefork openSUSE:Leap 15.6All versions2.4.58-150600.5.26.1
apache2-utils openSUSE:Leap 15.6All versions2.4.58-150600.5.26.1
apache2-worker openSUSE:Leap 15.6All versions2.4.58-150600.5.26.1

Products include Apache Http Server.

How do I fix CVE-2024-40725?

Upgrade apache to 2.4.62 or later.

Is CVE-2024-40725 being exploited?

There is no known exploitation of CVE-2024-40725 in the wild and no public exploit code.

Public exploit code: 2 proofs of concept on GitHub.

All Apache Http Server vulnerabilities

Sources

Also known as ALPINE-CVE-2024-40725, AZL-43414, AZL-43427, BELL-CVE-2024-40725, BIT-apache-2024-40725, CLEANSTART-2026-BD98589 and 8 more.

Is CVE-2024-40725 in your software?

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

Check your SBOMs for free