字号·· | 护眼
漏洞档案 · 严重

Apache HTTP Server 路径遍历与远程代码执行(CVE-2021-42013)

CVE-2021-42013 别名:GHSA-M24X-WX9P-JQMH、DEBIAN-CVE-2021-42013
CVSS 9.8 / 3.1 EPSS 100.0% CISA KEV 在野利用 勒索软件利用 公开 PoC · 47 Nuclei 模板
综合风险100/ 100
CVSS9.8严重
EPSS100.0%30 天利用概率
机构收录时间2021-10-07更新 2026-12-01

研判简报

概述

CVE-2021-42013 是 Apache HTTP Server 2.4.50 对前一个漏洞 CVE-2021-41773 的修复不充分而留下的路径穿越问题(CWE-22)。攻击者可通过特制 URL 访问 Alias 类指令所配置目录之外的文件;若这些文件未被默认的 “require all denied” 保护,请求即可成功,并且当别名路径同时启用了 CGI 脚本时,可能升级为远程代码执行。该问题影响面窄但危害极高:受影响版本明确限定为 2.4.49 与 2.4.50,不涉及更早版本。暴露在互联网上的 httpd 实例、以及启用了 mod_cgi 或 Alias 配置的运维与安全团队应优先关注。

严重性

CVSS 3.1 评分为 9.8(AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H),官方记录将其定性为 critical,综合风险分为 100.0/100;攻击面为未经认证的远程网络请求。CISA SSVC 判定为 automatable=yes、exploitation=active、technical_impact=total。

利用状态

截至核查日期 2026-11-24:EPSS 30 天利用概率为 100.0%(百分位 100.0%);已列入 CISA KEV(2021-11-03),要求按厂商指引修复,期限为 2021-11-17,且已知被勒索软件利用;存在公开 Nuclei 模板(http/cves/2021/CVE-2021-42013.yaml,标记 verified)以及 Exploit-DB 与公开 PoC 共 47 条。该漏洞属于已被大规模自动化扫描和实际利用的存量高危漏洞。

受影响产品

Apache Software Foundation 的 Apache HTTP Server 2.4.49 与 2.4.50,组件涉及路径规范化处理以及 Alias 类指令;只有当别名目录之外的资源未受默认 “require all denied” 保护时才可被读取,若同时启用 CGI,则可将风险升级为代码执行。部署形态涵盖任何暴露 HTTP 服务的 httpd 实例,材料未给出具体部署占比或资产规模数据。

修复版本

官方记录(含 CVE 描述与 KEV 动作)仅说明受影响版本为 2.4.49、2.4.50,本次所给官方页面材料未列出该 CVE 对应的修复版本号。参考材料中的 Nuclei 模板 remediation 写为“升级至 Apache HTTP Server 2.4.51 或更高”,与官方记录无冲突,但官方记录未明确确认,建议以厂商公告为准核实后再执行。

缓解措施

材料未给出厂商层面的临时缓解指引。基于漏洞成因,可采取的替代动作包括:确认 Alias 类指令映射目录之外的路径受默认 “require all denied” 保护;在无法立即升级时,于别名路径上禁用 CGI 执行,避免文件读取升级为 RCE;对来自外部的路径穿越编码请求进行拦截与告警。上述为基于官方描述的推断性措施,非厂商表态。

响应步骤

  1. 资产盘点:检索所有 Apache HTTP Server 实例,标记版本为 2.4.49 或 2.4.50 的主机与容器镜像。
  2. 配置核查:检查 Alias 类指令及对应目录的 “require all denied” 配置,确认 CGI 是否在别名路径启用。
  3. 验证检测:使用公开 Nuclei 模板(CVE-2021-42013.yaml)或等价手段在授权范围内验证是否可利用(模板请求含 %%32%65 编码穿越与 /cgi-bin/ 请求特征)。
  4. 处置修复:按厂商指引升级至已修复版本(版本号以官方公告为准,参考材料指向 2.4.51 及以上),遵循 KEV 期限要求。
  5. 溯源排查:结合 Web 访问日志检索疑似穿越编码与 /cgi-bin/ 异常请求,评估是否已被利用及数据外泄范围。
  6. 持续监控:将 EPSS、KEV 状态与该组件纳入漏洞管理看板,定期复测存量实例。

参考来源

  1. https://nvd.nist.gov/vuln/detail/CVE-2021-42013kev
  2. https://www.exploit-db.com/exploits/50406exploit,exploitdb
  3. https://www.exploit-db.com/exploits/50446exploit,exploitdb
  4. https://www.exploit-db.com/exploits/50512exploit,exploitdb
  5. https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-42013.yamlexploit,nuclei
  6. https://httpd.apache.org/security/vulnerabilities_24.htmlx_refsource_MISC,x_refsource_MISC,x_transferred,advisory,euvd
  7. https://lists.apache.org/thread.html/r7c795cd45a3384d4d27e57618a215b0ed19cb6ca8eb070061ad5d837%40%3Cannounce.apache.org%3Emailing-list,x_refsource_MLIST,mailing-list,x_refsource_MLIST,x_transferred,advi
  8. https://lists.apache.org/thread.html/rb5b0e46f179f60b0c70204656bc52fcb558e961cb4d06a971e9e3efb%40%3Cusers.httpd.apache.org%3Emailing-list,x_refsource_MLIST,mailing-list,x_refsource_MLIST,x_transferred,advi
  9. http://www.openwall.com/lists/oss-security/2021/10/07/6mailing-list,x_refsource_MLIST,mailing-list,x_refsource_MLIST,x_transferred,advi
  10. https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apache-httpd-pathtrv-LAzg68cZvendor-advisory,x_refsource_CISCO,vendor-advisory,x_refsource_CISCO,x_transferre
  11. http://jvn.jp/en/jp/JVN51106450/index.htmlthird-party-advisory,x_refsource_JVN,third-party-advisory,x_refsource_JVN,x_tran
  12. http://www.openwall.com/lists/oss-security/2021/10/08/1mailing-list,x_refsource_MLIST,mailing-list,x_refsource_MLIST,x_transferred,advi
  13. https://lists.apache.org/thread.html/r17a4c6ce9aff662efd9459e9d1850ab4a611cb23392fc68264c72cb3%40%3Ccvs.httpd.apache.org%3Emailing-list,x_refsource_MLIST,mailing-list,x_refsource_MLIST,x_transferred,advi
  14. http://www.openwall.com/lists/oss-security/2021/10/08/2mailing-list,x_refsource_MLIST,mailing-list,x_refsource_MLIST,x_transferred,advi
  15. http://www.openwall.com/lists/oss-security/2021/10/08/3mailing-list,x_refsource_MLIST,mailing-list,x_refsource_MLIST,x_transferred,advi
  16. http://www.openwall.com/lists/oss-security/2021/10/08/4mailing-list,x_refsource_MLIST,mailing-list,x_refsource_MLIST,x_transferred,advi