---
id: "CVE-2021-42013"
kind: "vulnerability"
aliases: ["CVE-2021-42013"]
title: "Apache HTTP Server: Apache HTTP Server Path Traversal Vulnerability"
severity: "critical"
cvss: 9.8
epss: 0.99964
exploited: true
status: "open"
category: "runtime"
products: [{"name": "Apache HTTP Server", "fixed": [], "affected": "", "ecosystem": "vendor"}]
ecosystems: ["vendor"]
tags: ["apache-httpd", "exploited", "linux", "ransomware", "runtime", "self-hosted", "web-server"]
not_affected_if: ["default-config", "managed-hosting", "version-not-2.4.49-or-2.4.50"]
published_at: "2021-10-07T16:15:09+00:00"
first_seen_at: "2026-10-23T19:11:53+00:00"
updated_at: "2026-10-23T21:57:35+00:00"
sources: [{"source": "kev", "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2021-42013", "first_seen_at": "2026-10-23T19:11:53+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2021-42013", "first_seen_at": "2026-10-23T19:13:44+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-42013", "first_seen_at": "2026-10-23T21:57:35+00:00"}]
---

# Apache HTTP Server: Apache HTTP Server Path Traversal Vulnerability

Apache HTTP Server 2.4.49 and 2.4.50 let remote attackers traverse outside Alias-mapped directories to read files and, when CGI is enabled, run commands. The flaw is actively exploited and is listed in CISA's Known Exploited Vulnerabilities catalog with ransomware use noted.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- vendor:Apache HTTP Server affected ? fixed ?

## How to check

Run httpd -v and check whether the version is 2.4.49 or 2.4.50.
Search the config for ScriptAlias, mod_cgi and 'Require all granted' under Alias-mapped paths.
Check access logs for requests containing '/.%2e/' or '%2e%2e' paths.

## Fix

Upgrade to Apache HTTP Server 2.4.51 or later, which fixes CVE-2021-41773 and CVE-2021-42013.
If you cannot upgrade at once, set 'Require all denied' for the root directory and disable CGI where it is not needed.

## Timeline

- 2026-10-23T19:11:53+00:00 kev https://www.cisa.gov/known-exploited-vulnerabilities-catalog?search_api_fulltext=CVE-2021-42013
- 2026-10-23T19:13:44+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2021-42013
- 2026-10-23T21:57:35+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2021-42013

## From the sources

It was found that the fix for CVE-2021-41773 in Apache HTTP Server 2.4.50 was insufficient. An attacker could use a path traversal attack to map URLs to files outside the directories configured by Alias-like directives. If files outside of these directories are not protected by the usual default configuration "require all denied", these requests can succeed. If CGI scripts are also enabled for these aliased pathes, this could allow for remote code execution. This issue only affects Apache 2.4.49 and Apache 2.4.50 and not earlier versions.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
