Apache HTTP Server Vulnerability: Unexpected Matching Behavior with 'MergeSlashes OFF'

apache2 Updated 02 Oct 2025

Summary

10/06/2021
N/A
Yes i
Medium
5.3

UBUNTU-CVE-2021-30641: Apache HTTP Server versions 2.4.39 to 2.4.46 Unexpected matching behavior with 'MergeSlashes OFF'. Affects apache2 versions < 2.4.7-1ubuntu4.22+esm1. Fixed in 2.4.7-1ubuntu4.22+esm1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Apache HTTP Server is a widely-used open-source web server software that enables users to serve web content. It is known for its flexibility, power, and wide range of features, including support for various programming languages and modules. However, certain versions of Apache HTTP Server are vulnerable to a specific issue that affects its handling of URL slashes, potentially leading to security risks.

Vulnerability Detail

The vulnerability, identified as CVE-2021-30641, affects Apache HTTP Server versions 2.4.39 to 2.4.46. It arises from unexpected matching behavior when the 'MergeSlashes' directive is set to OFF. This can lead to unintended access to resources, potentially allowing attackers to bypass security controls and access sensitive information. The vulnerability has a CVSS score of 5.3, indicating a medium level of severity.

How To Fix

Minimum fixed version

2.4.7-1ubuntu4.22+esm1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade apache2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can set the 'MergeSlashes' directive to ON in their Apache configuration file. This can be done by adding the following line to the Apache configuration:

MergeSlashes On

However, this may not be a permanent solution and should be followed by an update to the patched version.

Conclusion

The Apache HTTP Server vulnerability CVE-2021-30641 poses a significant risk due to unexpected matching behavior with the 'MergeSlashes OFF' setting. Users are strongly advised to update their Apache installations to the patched versions to mitigate potential security threats.

See every vulnerability recorded for apache2 →

Share this vulnerability

FAQ

The vulnerability affects Apache HTTP Server versions 2.4.39 to 2.4.46.

The CVSS score of the vulnerability is 5.3, indicating a medium level of severity.

You can use Vulert, which allows you to monitor and alert for open-source vulnerabilities in your software by analyzing a manifest file like package-lock.json. You can check your application using the Vulert playground without any signup.

If you cannot update immediately, consider applying the workaround by setting 'MergeSlashes' to ON in your Apache configuration, but plan to update as soon as possible.

More information can be found in the official security notices and vulnerability databases, such as the Ubuntu Security Notices.

Related vulnerabilities

Recent vulnerabilities recorded for apache2.

How To Fix

Minimum fixed version

2.4.7-1ubuntu4.22+esm1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade apache2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback