Amazon Linux 2 : httpd (ALAS-2021-1716) - Nessus

Critical   Plugin ID: 154179

This page contains detailed information about the Amazon Linux 2 : httpd (ALAS-2021-1716) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 154179
Name: Amazon Linux 2 : httpd (ALAS-2021-1716)
Filename: al2_ALAS-2021-1716.nasl
Vulnerability Published: 2021-08-16
This Plugin Published: 2021-10-16
Last Modification Time: 2022-01-26
Plugin Version: 1.10
Plugin Type: local
Plugin Family: Amazon Linux Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/AmazonLinux/release, Host/AmazonLinux/rpm-list, Host/local_checks_enabled

Vulnerability Information


Severity: Critical
Vulnerability Published: 2021-08-16
Patch Published: 2021-10-15
CVE [?]: CVE-2021-33193, CVE-2021-34798, CVE-2021-36160, CVE-2021-39275, CVE-2021-40438, CVE-2021-41524, CVE-2021-41773, CVE-2021-42013
CPE [?]: cpe:/o:amazon:linux:2, p-cpe:/a:amazon:linux:httpd, p-cpe:/a:amazon:linux:httpd-debuginfo, p-cpe:/a:amazon:linux:httpd-devel, p-cpe:/a:amazon:linux:httpd-filesystem, p-cpe:/a:amazon:linux:httpd-manual, p-cpe:/a:amazon:linux:httpd-tools, p-cpe:/a:amazon:linux:mod_ldap, p-cpe:/a:amazon:linux:mod_md, p-cpe:/a:amazon:linux:mod_proxy_html, p-cpe:/a:amazon:linux:mod_session, p-cpe:/a:amazon:linux:mod_ssl

Synopsis

The remote Amazon Linux 2 host is missing a security update.

Description

The version of httpd installed on the remote host is prior to 2.4.51-1. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2-2021-1716 advisory.

- A crafted method sent through HTTP/2 will bypass validation and be forwarded by mod_proxy, which can lead to request splitting or cache poisoning. This issue affects Apache HTTP Server 2.4.17 to 2.4.48. (CVE-2021-33193)

- Malformed requests may cause the server to dereference a NULL pointer. This issue affects Apache HTTP Server 2.4.48 and earlier. (CVE-2021-34798)

- A carefully crafted request uri-path can cause mod_proxy_uwsgi to read above the allocated memory and crash (DoS). This issue affects Apache HTTP Server versions 2.4.30 to 2.4.48 (inclusive). (CVE-2021-36160)

- ap_escape_quotes() may write beyond the end of a buffer when given malicious input. No included modules pass untrusted data to these functions, but third-party / external modules may. This issue affects Apache HTTP Server 2.4.48 and earlier. (CVE-2021-39275)

- A crafted request uri-path can cause mod_proxy to forward the request to an origin server choosen by the remote user. This issue affects Apache HTTP Server 2.4.48 and earlier. (CVE-2021-40438)

- While fuzzing the 2.4.49 httpd, a new null pointer dereference was detected during HTTP/2 request processing, allowing an external source to DoS the server. This requires a specially crafted request. The vulnerability was recently introduced in version 2.4.49. No exploit is known to the project. (CVE-2021-41524)

- A flaw was found in a change made to path normalization in Apache HTTP Server 2.4.49. 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 is known to be exploited in the wild. This issue only affects Apache 2.4.49 and not earlier versions. The fix in Apache HTTP Server 2.4.50 was found to be incomplete, see CVE-2021-42013. (CVE-2021-41773)

- 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. (CVE-2021-42013)

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Run 'yum update httpd' to update your system.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub, D2 Elliot)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Amazon Linux 2 : httpd (ALAS-2021-1716) vulnerability:

  1. Metasploit: auxiliary/scanner/http/apache_normalize_path
    [Apache 2.4.49/2.4.50 Traversal RCE]
  2. Metasploit: exploit/multi/http/apache_normalize_path_rce
    [Apache 2.4.49/2.4.50 Traversal RCE]
  3. Metasploit: auxiliary/scanner/http/apache_normalize_path
    [Apache 2.4.49/2.4.50 Traversal RCE scanner]
  4. Exploit-DB: exploits/multiple/webapps/50383.sh
    [EDB-50383: Apache HTTP Server 2.4.49 - Path Traversal & Remote Code Execution (RCE)]
  5. Exploit-DB: exploits/multiple/webapps/50406.sh
    [EDB-50406: Apache HTTP Server 2.4.50 - Path Traversal & Remote Code Execution (RCE)]
  6. Exploit-DB: exploits/multiple/webapps/50446.sh
    [EDB-50446: Apache HTTP Server 2.4.50 - Remote Code Execution (RCE) (2)]
  7. Exploit-DB: exploits/multiple/webapps/50512.py
    [EDB-50512: Apache HTTP Server 2.4.50 - Remote Code Execution (RCE) (3)]
  8. GitHub: https://github.com/CHYbeta/OddProxyDemo
    [CVE-2021-33193]
  9. GitHub: https://github.com/austin-lai/External-Penetration-Testing-Holo-Corporate-Network-TryHackMe-Holo-Network
    [CVE-2021-33193]
  10. GitHub: https://github.com/jeremy-cxf/CVE-2021-33193
    [CVE-2021-33193: PoC for CVE-2021-33193]
  11. GitHub: https://github.com/0day666/Vulnerability-verification
    [CVE-2021-40438]
  12. GitHub: https://github.com/BabyTeam1024/CVE-2021-40438
    [CVE-2021-40438]
  13. GitHub: https://github.com/CHYbeta/OddProxyDemo
    [CVE-2021-40438]
  14. GitHub: https://github.com/HxDDD/CVE-PoC
    [CVE-2021-40438]
  15. GitHub: https://github.com/Kashkovsky/CVE-2021-40438
    [CVE-2021-40438: Apache forward request CVE]
  16. GitHub: https://github.com/harsh-bothra/learn365
    [CVE-2021-40438]
  17. GitHub: https://github.com/litt1eb0yy/One-Liner-Scripts
    [CVE-2021-40438]
  18. GitHub: https://github.com/vsh00t/BB-PoC
    [CVE-2021-40438]
  19. GitHub: https://github.com/xiaojiangxl/CVE-2021-40438
    [CVE-2021-40438]
  20. GitHub: https://github.com/0day666/Vulnerability-verification
    [CVE-2021-41773]
  21. GitHub: https://github.com/0e0w/GoHackTools
    [CVE-2021-41773]
  22. GitHub: https://github.com/0x3n0/redeam
    [CVE-2021-41773]
  23. GitHub: https://github.com/0xsyr0/OSCP
    [CVE-2021-41773]
  24. GitHub: https://github.com/AkshayraviC09YC47/CVE-Exploits
    [CVE-2021-41773]
  25. GitHub: https://github.com/BabyTeam1024/CVE-2021-41773
    [CVE-2021-41773]
  26. GitHub: https://github.com/BincangSiber/CVE-2021-41773
    [CVE-2021-41773]
  27. GitHub: https://github.com/BlueTeamSteve/CVE-2021-41773
    [CVE-2021-41773]
  28. GitHub: https://github.com/CHYbeta/Vuln100Topics20
    [CVE-2021-41773]
  29. GitHub: https://github.com/Chocapikk/CVE-2021-41773
    [CVE-2021-41773]
  30. GitHub: https://github.com/ComdeyOverFlow/CVE-2021-41773
    [CVE-2021-41773]
  31. GitHub: https://github.com/ComdeyOverflow/CVE-2021-41773
    [CVE-2021-41773]
  32. GitHub: https://github.com/DoTuan1/Reserch-CVE-2021-41773
    [CVE-2021-41773]
  33. GitHub: https://github.com/FDlucifer/firece-fish
    [CVE-2021-41773]
  34. GitHub: https://github.com/Fa1c0n35/CVE-2021-41773
    [CVE-2021-41773]
  35. GitHub: https://github.com/H0j3n/EzpzCheatSheet
    [CVE-2021-41773]
  36. GitHub: https://github.com/H0j3n/EzpzShell
    [CVE-2021-41773]
  37. GitHub: https://github.com/HxDDD/CVE-PoC
    [CVE-2021-41773]
  38. GitHub: https://github.com/KAB8345/CVE-2021-41773
    [CVE-2021-41773]
  39. GitHub: https://github.com/LayarKacaSiber/CVE-2021-41773
    [CVE-2021-41773]
  40. GitHub: https://github.com/LetouRaphael/Poc-CVE-2021-41773
    [CVE-2021-41773]
  41. GitHub: https://github.com/MazX0p/CVE-2021-41773
    [CVE-2021-41773]
  42. GitHub: https://github.com/Ming119/CVE-2021-41773_Exploit
    [CVE-2021-41773]
  43. GitHub: https://github.com/Mr-xn/Penetration_Testing_POC
    [CVE-2021-41773]
  44. GitHub: https://github.com/N0el4kLs/Vulhub_Exp
    [CVE-2021-41773]
  45. GitHub: https://github.com/N3w-elf/CVE-2021-41773-
    [CVE-2021-41773]
  46. GitHub: https://github.com/Shadow-warrior0/Apache_path_traversal
    [CVE-2021-41773]
  47. GitHub: https://github.com/TAI-REx/cve-2021-41773-nse
    [CVE-2021-41773]
  48. GitHub: https://github.com/TishcaTpx/cve-2021-41773-nse
    [CVE-2021-41773: CVE-2021-41773.nse]
  49. GitHub: https://github.com/WynSon/CVE-2021-41773
    [CVE-2021-41773]
  50. GitHub: https://github.com/ZephrFish/CVE-2021-41773-PoC
    [CVE-2021-41773]
  51. GitHub: https://github.com/ahmad4fifz/docker-cve-2021-41773
    [CVE-2021-41773]
  52. GitHub: https://github.com/anonsecteaminc/CVE-2021-41773-PoC
    [CVE-2021-41773: CVE-2021-41773-PoC]
  53. GitHub: https://github.com/asaotomo/CVE-2021-42013-Apache-RCE-POC-EXP
    [CVE-2021-41773: Apache HTTP ...]
  54. GitHub: https://github.com/asaotomo/CVE-2021-42013-Apache-RCE-Poc-Exp
    [CVE-2021-41773: Apache 远程代码执行 (CVE-2021-42013)批量检测工具:Apache HTTP ...]
  55. GitHub: https://github.com/bernardas/netsec-polygon
    [CVE-2021-41773: Environment for CVE-2021-41773 recreation.]
  56. GitHub: https://github.com/binganao/vulns-2022
    [CVE-2021-41773]
  57. GitHub: https://github.com/byteofjoshua/CVE-2021-41773
    [CVE-2021-41773]
  58. GitHub: https://github.com/capdegarde/apache_path_traversal
    [CVE-2021-41773]
  59. GitHub: https://github.com/cgddgc/CVE-2021-41773-42013
    [CVE-2021-41773]
  60. GitHub: https://github.com/cisagov/Malcolm
    [CVE-2021-41773]
  61. GitHub: https://github.com/creadpag/cve-2021-41773-nse
    [CVE-2021-41773: CVE-2021-41773.nse]
  62. GitHub: https://github.com/cryst4lliz3/CVE-2021-41773
    [CVE-2021-41773]
  63. GitHub: https://github.com/fardeen-ahmed/Bug-bounty-Writeups
    [CVE-2021-41773]
  64. GitHub: https://github.com/fnatalucci/CVE-2021-41773-RCE
    [CVE-2021-41773]
  65. GitHub: https://github.com/hackingyseguridad/nmap
    [CVE-2021-41773]
  66. GitHub: https://github.com/honypot/CVE-2021-41773
    [CVE-2021-41773]
  67. GitHub: https://github.com/htrgouvea/lab-cve-2021-41773
    [CVE-2021-41773: Docker container lab to play/learn with CVE-2021-41773]
  68. GitHub: https://github.com/htrgouvea/research
    [CVE-2021-41773]
  69. GitHub: https://github.com/i6c/MASS_CVE-2021-41773
    [CVE-2021-41773]
  70. GitHub: https://github.com/iilegacyyii/PoC-CVE-2021-41773
    [CVE-2021-41773]
  71. GitHub: https://github.com/jhye0n/CVE-2021-41773
    [CVE-2021-41773: CVE-2021-41773 Test Page & Exploit Code]
  72. GitHub: https://github.com/kubota/POC-CVE-2021-41773
    [CVE-2021-41773]
  73. GitHub: https://github.com/lorddemon/CVE-2021-41773-PoC
    [CVE-2021-41773]
  74. GitHub: https://github.com/lsass-exe/CVE-2021-41773
    [CVE-2021-41773]
  75. GitHub: https://github.com/ltfafei/my_POC
    [CVE-2021-41773]
  76. GitHub: https://github.com/luck-ying/Library-POC
    [CVE-2021-41773]
  77. GitHub: https://github.com/m96dg/CVE-2021-41773-exercise
    [CVE-2021-41773: A flaw was found in a change made to path normalization in Apache HTTP Server ...]
  78. GitHub: https://github.com/m96dg/vulnerable_docker_apache_2_4_49
    [CVE-2021-41773]
  79. GitHub: https://github.com/mahtin/unix-v7-uucp-chkpth-bug
    [CVE-2021-41773]
  80. GitHub: https://github.com/masahiro331/CVE-2021-41773
    [CVE-2021-41773]
  81. GitHub: https://github.com/meicookies/cve-2021-41773_2021-42013
    [CVE-2021-41773: mass scan for apache 2.4.49/2.4.50]
  82. GitHub: https://github.com/mohwahyudi/cve-2021-41773
    [CVE-2021-41773]
  83. GitHub: https://github.com/norrig/CVE-2021-41773-exploiter
    [CVE-2021-41773: School project - Please use other repos for actual testing]
  84. GitHub: https://github.com/oxctdev/CVE-2021-41773
    [CVE-2021-41773: Apache HTTPd (2.4.49) – Local File Disclosure (LFI)]
  85. GitHub: https://github.com/pisut4152/Sigma-Rule-for-CVE-2021-41773-and-CVE-2021-42013-exploitation-attempt
    [CVE-2021-41773]
  86. GitHub: https://github.com/puckiestyle/CVE-2021-41773
    [CVE-2021-41773]
  87. GitHub: https://github.com/qwutony/CVE-2021-41773
    [CVE-2021-41773]
  88. GitHub: https://github.com/r00tVen0m/CVE-2021-41773
    [CVE-2021-41773]
  89. GitHub: https://github.com/ranggaggngntt/CVE-2021-41773
    [CVE-2021-41773]
  90. GitHub: https://github.com/shiomiyan/CVE-2021-41773
    [CVE-2021-41773]
  91. GitHub: https://github.com/signorrayan/RedTeam_toolkit
    [CVE-2021-41773]
  92. GitHub: https://github.com/skentagon/CVE-2021-41773
    [CVE-2021-41773]
  93. GitHub: https://github.com/spiderz0ne/CVE-2021-41773
    [CVE-2021-41773]
  94. GitHub: https://github.com/the29a/CVE-2021-41773
    [CVE-2021-41773: Small PoC of CVE-2021-41773]
  95. GitHub: https://github.com/thehackersbrain/CVE-2021-41773
    [CVE-2021-41773: Apache2 2.4.49 - LFI & RCE Exploit - CVE-2021-41773]
  96. GitHub: https://github.com/twseptian/CVE-2021-42013-Docker-Lab
    [CVE-2021-41773]
  97. GitHub: https://github.com/vuongnv3389-sec/cve-2021-41773
    [CVE-2021-41773]
  98. GitHub: https://github.com/xMohamed0/CVE-2021-41773
    [CVE-2021-41773]
  99. GitHub: https://github.com/0day666/Vulnerability-verification
    [CVE-2021-42013]
  100. GitHub: https://github.com/Adash7/CVE-2021-42013
    [CVE-2021-42013]
  101. GitHub: https://github.com/BincangSiber/CVE-2021-42013
    [CVE-2021-42013]
  102. GitHub: https://github.com/CHYbeta/Vuln100Topics20
    [CVE-2021-42013]
  103. GitHub: https://github.com/CalfCrusher/Path-traversal-RCE-Apache-2.4.49-2.4.50-Exploit
    [CVE-2021-42013: CVE-2021-41773]
  104. GitHub: https://github.com/FDlucifer/firece-fish
    [CVE-2021-42013]
  105. GitHub: https://github.com/H0j3n/EzpzCheatSheet
    [CVE-2021-42013]
  106. GitHub: https://github.com/H0j3n/EzpzShell
    [CVE-2021-42013]
  107. GitHub: https://github.com/LayarKacaSiber/CVE-2021-42013
    [CVE-2021-42013]
  108. GitHub: https://github.com/Ls4ss/CVE-2021-41773_CVE-2021-42013
    [CVE-2021-42013]
  109. GitHub: https://github.com/Mr-xn/Penetration_Testing_POC
    [CVE-2021-42013]
  110. GitHub: https://github.com/Shadow-warrior0/Apache_path_traversal
    [CVE-2021-42013]
  111. GitHub: https://github.com/Zeop-CyberSec/apache_normalize_path
    [CVE-2021-42013]
  112. GitHub: https://github.com/ahmad4fifz/CVE-2021-41773
    [CVE-2021-42013]
  113. GitHub: https://github.com/asaotomo/CVE-2021-42013-Apache-RCE-POC-EXP
    [CVE-2021-42013: Apache HTTP ...]
  114. GitHub: https://github.com/asaotomo/CVE-2021-42013-Apache-RCE-Poc-Exp
    [CVE-2021-42013: Apache 远程代码执行 (CVE-2021-42013)批量检测工具:Apache HTTP ...]
  115. GitHub: https://github.com/cryst4lliz3/CVE-2021-42013
    [CVE-2021-42013]
  116. GitHub: https://github.com/honypot/CVE-2021-42013
    [CVE-2021-42013]
  117. GitHub: https://github.com/ibrahimetecicek/Advent-of-Cyber-3-2021-
    [CVE-2021-42013]
  118. GitHub: https://github.com/im-hanzou/apachrot
    [CVE-2021-42013]
  119. GitHub: https://github.com/jas9reet/CVE-2021-42013-LAB
    [CVE-2021-42013: Apache HTTP Server 2.4.50 - RCE Lab]
  120. GitHub: https://github.com/ksanchezcld/httpd-2.4.49
    [CVE-2021-42013]
  121. GitHub: https://github.com/ltfafei/my_POC
    [CVE-2021-42013]
  122. GitHub: https://github.com/mr-exo/CVE-2021-41773
    [CVE-2021-42013]
  123. GitHub: https://github.com/pisut4152/Sigma-Rule-for-CVE-2021-41773-and-CVE-2021-42013-exploitation-attempt
    [CVE-2021-42013]
  124. GitHub: https://github.com/rnsss/CVE-2021-42013
    [CVE-2021-42013: CVE-2021-42013-exp]
  125. GitHub: https://github.com/simon242/CVE-2021-42013
    [CVE-2021-42013]
  126. GitHub: https://github.com/tangxiaofeng7/CVE-2022-22947-Spring-Cloud-Gateway
    [CVE-2021-42013: CVE-2021-42013批量]
  127. GitHub: https://github.com/twseptian/CVE-2021-41773
    [CVE-2021-42013]
  128. GitHub: https://github.com/twseptian/CVE-2021-42013-Lab
    [CVE-2021-42013: Docker container lab to play/learn with CVE-2021-42013]
  129. GitHub: https://github.com/twseptian/cve-2021-42013-docker-lab
    [CVE-2021-42013: Docker container lab to play/learn with CVE-2021-42013]
  130. GitHub: https://github.com/vulf/CVE-2021-41773_42013
    [CVE-2021-42013]
  131. GitHub: https://github.com/walnutsecurity/CVE-2021-42013
    [CVE-2021-42013: cve-2021-42013.py is a python script that will help in finding Path Traversal or ...]
  132. GitHub: https://github.com/wangfly-me/Apache_Penetration_Tool
    [CVE-2021-42013: CVE-2021-41773&CVE-2021-42013]
  133. GitHub: https://github.com/xMohamed0/CVE-2021-42013-ApacheRCE
    [CVE-2021-42013]
  134. GitHub: https://github.com/ericmann/apache-cve-poc
    [CVE-2021-40438: Dockerized Proof-of-Concept of CVE-2021-40438 in Apache 2.4.48.]
  135. GitHub: https://github.com/pisut4152/Sigma-Rule-for-CVE-2021-40438-exploitation-attempt
    [CVE-2021-40438: Sigma-Rule-for-CVE-2021-40438-Attack-Attemp]
  136. GitHub: https://github.com/sixpacksecurity/CVE-2021-40438
    [CVE-2021-40438: CVE-2021-40438 exploit PoC with Docker setup.]
  137. GitHub: https://github.com/0xAlmighty/CVE-2021-41773-PoC
    [CVE-2021-41773: Path Traversal and RCE in Apache HTTP Server 2.4.49]
  138. GitHub: https://github.com/0xRar/CVE-2021-41773
    [CVE-2021-41773: Exploit for Apache 2.4.49]
  139. GitHub: https://github.com/1nhann/CVE-2021-41773
    [CVE-2021-41773: CVE-2021-41773 的复现]
  140. GitHub: https://github.com/5gstudent/cve-2021-41773-and-cve-2021-42013
    [CVE-2021-41773: cve-2021-41773 即 cve-2021-42013 批量检测脚本]
  141. GitHub: https://github.com/ahmad4fifz/CVE-2021-41773
    [CVE-2021-41773: CVE-2021-41773 on Docker]
  142. GitHub: https://github.com/ahmad4fifz/CVE-2021-42013
    [CVE-2021-41773: CVE-2021-41773 on Docker]
  143. GitHub: https://github.com/apapedulimu/Apachuk
    [CVE-2021-41773: CVE-2021-41773 Grabber]
  144. GitHub: https://github.com/AssassinUKG/CVE-2021-41773
    [CVE-2021-41773: Apache 2.4.49]
  145. GitHub: https://github.com/b1tsec/CVE-2021-41773
    [CVE-2021-41773: A Python script to check if an Apache web server is vulnerable to CVE-2021-41773]
  146. GitHub: https://github.com/Balgogan/CVE-2021-41773
    [CVE-2021-41773: Ce programme permet de détecter une faille RCE sur les serveurs Apache 2.4.49 et ...]
  147. GitHub: https://github.com/blasty/CVE-2021-41773
    [CVE-2021-41773: CVE-2021-41773 playground]
  148. GitHub: https://github.com/CalfCrusher/Path-traversal-RCE-Apache-2.4.49-2.4.50-Exploit
    [CVE-2021-41773: CVE-2021-41773 | CVE-2021-42013 Exploit Tool (Apache/2.4.49-2.4.50)]
  149. GitHub: https://github.com/cloudbyteelias/CVE-2021-41773
    [CVE-2021-41773: CVE-2021-41773 Docker lab]
  150. GitHub: https://github.com/corelight/CVE-2021-41773
    [CVE-2021-41773: A Zeek package which raises notices for Path Traversal/RCE in Apache HTTP Server ...]
  151. GitHub: https://github.com/creadpag/CVE-2021-41773-POC
    [CVE-2021-41773]
  152. GitHub: https://github.com/EagleTube/CVE-2021-41773
    [CVE-2021-41773: Apache 2.4.49 Path Traversal Vulnerability Checker]
  153. GitHub: https://github.com/habibiefaried/CVE-2021-41773-PoC
    [CVE-2021-41773: PoC for CVE-2021-41773 with docker to demonstrate]
  154. GitHub: https://github.com/HightechSec/scarce-apache2
    [CVE-2021-41773: A framework for bug hunting or pentesting targeting websites that have ...]
  155. GitHub: https://github.com/Hydragyrum/CVE-2021-41773-Playground
    [CVE-2021-41773: Some docker images to play with CVE-2021-41773 and CVE-2021-42013]
  156. GitHub: https://github.com/IcmpOff/Apache-2.4.49-2.4.50-Traversal-Remote-Code-Execution-Exploit
    [CVE-2021-41773: This Metasploit module exploits an unauthenticated remote code execution ...]
  157. GitHub: https://github.com/im-hanzou/apachrot
    [CVE-2021-41773: Apache CVE-2021-41773/2021-42013 Mass Vulnerability Checker]
  158. GitHub: https://github.com/inbug-team/CVE-2021-41773_CVE-2021-42013
    [CVE-2021-41773: CVE-2021-41773 CVE-2021-42013漏洞批量检测工具]
  159. GitHub: https://github.com/itsecurityco/CVE-2021-41773
    [CVE-2021-41773: CVE-2021-41773 POC with Docker]
  160. GitHub: https://github.com/jbovet/CVE-2021-41773
    [CVE-2021-41773: Path traversal and file disclosure vulnerability in Apache HTTP Server 2.4.49 ...]
  161. GitHub: https://github.com/jheeree/Simple-CVE-2021-41773-checker
    [CVE-2021-41773: Simple script realizado en bash, para revisión de múltiples hosts para ...]
  162. GitHub: https://github.com/justakazh/mass_cve-2021-41773
    [CVE-2021-41773: MASS CVE-2021-41773]
  163. GitHub: https://github.com/knqyf263/CVE-2021-41773
    [CVE-2021-41773: Path traversal in Apache HTTP Server 2.4.49 (CVE-2021-41773)]
  164. GitHub: https://github.com/ksanchezcld/httpd-2.4.49
    [CVE-2021-41773: Critical: Path Traversal and Remote Code Execution in Apache HTTP Server 2.4.49 and ...]
  165. GitHub: https://github.com/lopqto/CVE-2021-41773_Honeypot
    [CVE-2021-41773: Simple honeypot for CVE-2021-41773 vulnerability]
  166. GitHub: https://github.com/Ls4ss/CVE-2021-41773_CVE-2021-42013
    [CVE-2021-41773: Apache HTTP Server 2.4.49, 2.4.50 - Path Traversal & RCE]
  167. GitHub: https://github.com/LudovicPatho/CVE-2021-41773
    [CVE-2021-41773: The first vulnerability with the CVE identifier CVE-2021-41773 is a path traversal ...]
  168. GitHub: https://github.com/mauricelambert/CVE-2021-41773
    [CVE-2021-41773: These Metasploit, Nmap, Python and Ruby scripts detects and exploits CVE-2021-41773 ...]
  169. GitHub: https://github.com/MrCl0wnLab/SimplesApachePathTraversal
    [CVE-2021-41773: Tool check: CVE-2021-41773, CVE-2021-42013, CVE-2020-17519]
  170. GitHub: https://github.com/mr-exo/CVE-2021-41773
    [CVE-2021-41773: Remote Code Execution exploit for Apache servers. Affected versions: Apache 2.4.49, ...]
  171. GitHub: https://github.com/n3k00n3/CVE-2021-41773
    [CVE-2021-41773: exploit to CVE-2021-41773]
  172. GitHub: https://github.com/numanturle/CVE-2021-41773
    [CVE-2021-41773]
  173. GitHub: https://github.com/PentesterGuruji/CVE-2021-41773
    [CVE-2021-41773: Path Traversal vulnerability in Apache 2.4.49]
  174. GitHub: https://github.com/RyouYoo/CVE-2021-41773
    [CVE-2021-41773: Exploitation of CVE-2021-41773 a Directory Traversal in Apache 2.4.49.]
  175. GitHub: https://github.com/Sakura-nee/CVE-2021-41773
    [CVE-2021-41773: Mass exploitation CVE-2021-41773 and auto detect possible RCE]
  176. GitHub: https://github.com/scarmandef/CVE-2021-41773
    [CVE-2021-41773: Apache HTTP Server 2.4.49, 2.4.50 - Path Traversal & RCE]
  177. GitHub: https://github.com/superzerosec/CVE-2021-41773
    [CVE-2021-41773: POC]
  178. GitHub: https://github.com/TheLastVvV/CVE-2021-41773
    [CVE-2021-41773: Poc CVE 2021-41773 - Apache 2.4.49 with CGI enabled]
  179. GitHub: https://github.com/TishcaTpx/POC-CVE-2021-41773
    [CVE-2021-41773: Poc.py]
  180. GitHub: https://github.com/twseptian/CVE-2021-41773
    [CVE-2021-41773: CVE-2021-41773: Path Traversal Zero-Day in Apache HTTP Server Exploited]
  181. GitHub: https://github.com/vida00/Scanner-CVE-2021-41773
    [CVE-2021-41773: A automatic scanner to apache 2.4.49]
  182. GitHub: https://github.com/vinhjaxt/CVE-2021-41773-exploit
    [CVE-2021-41773: CVE-2021-41773, poc, exploit]
  183. GitHub: https://github.com/vulf/CVE-2021-41773_42013
    [CVE-2021-41773: Lab setup for CVE-2021-41773 (Apache httpd 2.4.49) and CVE-2021-42013 (Apache httpd ...]
  184. GitHub: https://github.com/Vulnmachines/cve-2021-41773
    [CVE-2021-41773: CVE-2021-41773 Path Traversal vulnerability in Apache 2.4.49.]
  185. GitHub: https://github.com/wangfly-me/Apache_Penetration_Tool
    [CVE-2021-41773: CVE-2021-41773&CVE-2021-42013图形化漏洞检测利用工具]
  186. GitHub: https://github.com/wolf1892/CVE-2021-41773
    [CVE-2021-41773: Setup vulnerable enviornment]
  187. GitHub: https://github.com/zeronine9/CVE-2021-41773
    [CVE-2021-41773: Fast python tool to test apache path traversal CVE-2021-41773 in a List of url]
  188. GitHub: https://github.com/5gstudent/cve-2021-41773-and-cve-2021-42013
    [CVE-2021-42013: cve-2021-41773 即 cve-2021-42013 批量检测脚本]
  189. GitHub: https://github.com/ahmad4fifz/CVE-2021-42013
    [CVE-2021-42013: CVE-2021-41773 on Docker]
  190. GitHub: https://github.com/andrea-mattioli/apache-exploit-CVE-2021-42013
    [CVE-2021-42013: Exploit with integrated shodan search]
  191. GitHub: https://github.com/corelight/CVE-2021-41773
    [CVE-2021-42013: A Zeek package which raises notices for Path Traversal/RCE in Apache HTTP Server ...]
  192. GitHub: https://github.com/Hydragyrum/CVE-2021-41773-Playground
    [CVE-2021-42013: Some docker images to play with CVE-2021-41773 and CVE-2021-42013]
  193. GitHub: https://github.com/IcmpOff/Apache-2.4.49-2.4.50-Traversal-Remote-Code-Execution-Exploit
    [CVE-2021-42013: This Metasploit module exploits an unauthenticated remote code execution ...]
  194. GitHub: https://github.com/inbug-team/CVE-2021-41773_CVE-2021-42013
    [CVE-2021-42013: CVE-2021-41773 CVE-2021-42013漏洞批量检测工具]
  195. GitHub: https://github.com/mauricelambert/CVE-2021-42013
    [CVE-2021-42013: These Nmap, Python and Ruby scripts detects and exploits CVE-2021-42013 with RCE and ...]
  196. GitHub: https://github.com/MrCl0wnLab/SimplesApachePathTraversal
    [CVE-2021-42013: Tool check: CVE-2021-41773, CVE-2021-42013, CVE-2020-17519]
  197. GitHub: https://github.com/robotsense1337/CVE-2021-42013
    [CVE-2021-42013: Exploit Apache 2.4.50(CVE-2021-42013)]
  198. GitHub: https://github.com/TheLastVvV/CVE-2021-42013_Reverse-Shell
    [CVE-2021-42013: PoC CVE-2021-42013 reverse shell Apache 2.4.50 with CGI]
  199. GitHub: https://github.com/theLSA/apache-httpd-path-traversal-checker
    [CVE-2021-42013: apache httpd path traversal checker(CVE-2021-41773 / CVE-2021-42013)]
  200. GitHub: https://github.com/twseptian/CVE-2021-42013-Docker-Lab
    [CVE-2021-42013: Docker container lab to play/learn with CVE-2021-42013]
  201. GitHub: https://github.com/Vulnmachines/cve-2021-42013
    [CVE-2021-42013: Apache 2.4.50 Path traversal vulnerability]
  202. GitHub: https://github.com/walnutsecurity/cve-2021-42013
    [CVE-2021-42013: Cve-2021-42013.py is a python script that will help in finding Path Traversal or ...]
  203. GitHub: https://github.com/shellreaper/CVE-2021-41773
    [CVE-2021-41773: This is a simple POC for Apache/2.4.49 Path Traversal Vulnerability]
  204. GitHub: https://github.com/theLSA/apache-httpd-path-traversal-checker
    [CVE-2021-41773: Apache httpd path traversal checker(CVE-2021-41773 / CVE-2021-42013)]
  205. GitHub: https://github.com/walnutsecurity/cve-2021-41773
    [CVE-2021-41773: Cve-2021-41773.py is a python script that will help in finding Path Traversal or ...]
  206. GitHub: https://github.com/Zeop-CyberSec/apache_normalize_path
    [CVE-2021-41773: Metasploit-Framework modules (scanner and exploit) for the CVE-2021-41773 and ...]
  207. D2 Elliot: apache_2.4.50_rce.html
    [Apache 2.4.50 RCE]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2021-42013
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:H/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.5 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.5 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.4 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.4 (Critical)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


This is the al2_ALAS-2021-1716.nasl nessus plugin source code. This script is Copyright (C) 2021-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
##
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Amazon Linux 2 Security Advisory ALAS-2021-1716.
##

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(154179);
  script_version("1.10");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/01/26");

  script_cve_id(
    "CVE-2021-33193",
    "CVE-2021-34798",
    "CVE-2021-36160",
    "CVE-2021-39275",
    "CVE-2021-40438",
    "CVE-2021-41524",
    "CVE-2021-41773",
    "CVE-2021-42013"
  );
  script_xref(name:"IAVA", value:"2021-A-0440-S");
  script_xref(name:"IAVA", value:"2021-A-0451-S");
  script_xref(name:"ALAS", value:"2021-1716");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2021/11/17");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2021/12/15");

  script_name(english:"Amazon Linux 2 : httpd (ALAS-2021-1716)");

  script_set_attribute(attribute:"synopsis", value:
"The remote Amazon Linux 2 host is missing a security update.");
  script_set_attribute(attribute:"description", value:
"The version of httpd installed on the remote host is prior to 2.4.51-1. It is, therefore, affected by multiple
vulnerabilities as referenced in the ALAS2-2021-1716 advisory.

  - A crafted method sent through HTTP/2 will bypass validation and be forwarded by mod_proxy, which can lead
    to request splitting or cache poisoning. This issue affects Apache HTTP Server 2.4.17 to 2.4.48.
    (CVE-2021-33193)

  - Malformed requests may cause the server to dereference a NULL pointer. This issue affects Apache HTTP
    Server 2.4.48 and earlier. (CVE-2021-34798)

  - A carefully crafted request uri-path can cause mod_proxy_uwsgi to read above the allocated memory and
    crash (DoS). This issue affects Apache HTTP Server versions 2.4.30 to 2.4.48 (inclusive). (CVE-2021-36160)

  - ap_escape_quotes() may write beyond the end of a buffer when given malicious input. No included modules
    pass untrusted data to these functions, but third-party / external modules may. This issue affects Apache
    HTTP Server 2.4.48 and earlier. (CVE-2021-39275)

  - A crafted request uri-path can cause mod_proxy to forward the request to an origin server choosen by the
    remote user. This issue affects Apache HTTP Server 2.4.48 and earlier. (CVE-2021-40438)

  - While fuzzing the 2.4.49 httpd, a new null pointer dereference was detected during HTTP/2 request
    processing, allowing an external source to DoS the server. This requires a specially crafted request. The
    vulnerability was recently introduced in version 2.4.49. No exploit is known to the project.
    (CVE-2021-41524)

  - A flaw was found in a change made to path normalization in Apache HTTP Server 2.4.49. 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 is known to be exploited in the wild. This
    issue only affects Apache 2.4.49 and not earlier versions. The fix in Apache HTTP Server 2.4.50 was found
    to be incomplete, see CVE-2021-42013. (CVE-2021-41773)

  - 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. (CVE-2021-42013)

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version
number.");
  script_set_attribute(attribute:"see_also", value:"https://alas.aws.amazon.com/AL2/ALAS-2021-1716.html");
  script_set_attribute(attribute:"see_also", value:"https://access.redhat.com/security/cve/CVE-2021-33193");
  script_set_attribute(attribute:"see_also", value:"https://access.redhat.com/security/cve/CVE-2021-34798");
  script_set_attribute(attribute:"see_also", value:"https://access.redhat.com/security/cve/CVE-2021-36160");
  script_set_attribute(attribute:"see_also", value:"https://access.redhat.com/security/cve/CVE-2021-39275");
  script_set_attribute(attribute:"see_also", value:"https://access.redhat.com/security/cve/CVE-2021-40438");
  script_set_attribute(attribute:"see_also", value:"https://access.redhat.com/security/cve/CVE-2021-41524");
  script_set_attribute(attribute:"see_also", value:"https://access.redhat.com/security/cve/CVE-2021-41773");
  script_set_attribute(attribute:"see_also", value:"https://access.redhat.com/security/cve/CVE-2021-42013");
  script_set_attribute(attribute:"solution", value:
"Run 'yum update httpd' to update your system.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2021-42013");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"d2_elliot_name", value:"Apache 2.4.50 RCE");
  script_set_attribute(attribute:"exploit_framework_d2_elliot", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Apache 2.4.49/2.4.50 Traversal RCE');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2021/08/16");
  script_set_attribute(attribute:"patch_publication_date", value:"2021/10/15");
  script_set_attribute(attribute:"plugin_publication_date", value:"2021/10/16");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:httpd");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:httpd-debuginfo");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:httpd-devel");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:httpd-filesystem");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:httpd-manual");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:httpd-tools");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:mod_ldap");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:mod_md");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:mod_proxy_html");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:mod_session");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:mod_ssl");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:amazon:linux:2");
  script_set_attribute(attribute:"stig_severity", value:"I");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Amazon Linux Local Security Checks");

  script_copyright(english:"This script is Copyright (C) 2021-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/AmazonLinux/release", "Host/AmazonLinux/rpm-list");

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("rpm.inc");

if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);

var release = get_kb_item("Host/AmazonLinux/release");
if (isnull(release) || !strlen(release)) audit(AUDIT_OS_NOT, "Amazon Linux");
var os_ver = pregmatch(pattern: "^AL(A|\d)", string:release);
if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Amazon Linux");
var os_ver = os_ver[1];
if (os_ver != "2")
{
  if (os_ver == 'A') os_ver = 'AMI';
  audit(AUDIT_OS_NOT, "Amazon Linux 2", "Amazon Linux " + os_ver);
}

if (!get_kb_item("Host/AmazonLinux/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);

var pkgs = [
    {'reference':'httpd-2.4.51-1.amzn2', 'cpu':'aarch64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'httpd-2.4.51-1.amzn2', 'cpu':'i686', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'httpd-2.4.51-1.amzn2', 'cpu':'x86_64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'httpd-debuginfo-2.4.51-1.amzn2', 'cpu':'aarch64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'httpd-debuginfo-2.4.51-1.amzn2', 'cpu':'i686', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'httpd-debuginfo-2.4.51-1.amzn2', 'cpu':'x86_64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'httpd-devel-2.4.51-1.amzn2', 'cpu':'aarch64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'httpd-devel-2.4.51-1.amzn2', 'cpu':'i686', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'httpd-devel-2.4.51-1.amzn2', 'cpu':'x86_64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'httpd-filesystem-2.4.51-1.amzn2', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'httpd-manual-2.4.51-1.amzn2', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'httpd-tools-2.4.51-1.amzn2', 'cpu':'aarch64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'httpd-tools-2.4.51-1.amzn2', 'cpu':'i686', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'httpd-tools-2.4.51-1.amzn2', 'cpu':'x86_64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_ldap-2.4.51-1.amzn2', 'cpu':'aarch64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_ldap-2.4.51-1.amzn2', 'cpu':'i686', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_ldap-2.4.51-1.amzn2', 'cpu':'x86_64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_md-2.4.51-1.amzn2', 'cpu':'aarch64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_md-2.4.51-1.amzn2', 'cpu':'i686', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_md-2.4.51-1.amzn2', 'cpu':'x86_64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_proxy_html-2.4.51-1.amzn2', 'cpu':'aarch64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_proxy_html-2.4.51-1.amzn2', 'cpu':'i686', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_proxy_html-2.4.51-1.amzn2', 'cpu':'x86_64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_session-2.4.51-1.amzn2', 'cpu':'aarch64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_session-2.4.51-1.amzn2', 'cpu':'i686', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_session-2.4.51-1.amzn2', 'cpu':'x86_64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_ssl-2.4.51-1.amzn2', 'cpu':'aarch64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_ssl-2.4.51-1.amzn2', 'cpu':'i686', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE},
    {'reference':'mod_ssl-2.4.51-1.amzn2', 'cpu':'x86_64', 'release':'AL2', 'rpm_spec_vers_cmp':TRUE}
];

var flag = 0;
foreach package_array ( pkgs ) {
  var reference = NULL;
  var release = NULL;
  var cpu = NULL;
  var el_string = NULL;
  var rpm_spec_vers_cmp = NULL;
  var allowmaj = NULL;
  if (!empty_or_null(package_array['reference'])) reference = package_array['reference'];
  if (!empty_or_null(package_array['release'])) release = package_array['release'];
  if (!empty_or_null(package_array['cpu'])) cpu = package_array['cpu'];
  if (!empty_or_null(package_array['el_string'])) el_string = package_array['el_string'];
  if (!empty_or_null(package_array['rpm_spec_vers_cmp'])) rpm_spec_vers_cmp = package_array['rpm_spec_vers_cmp'];
  if (!empty_or_null(package_array['allowmaj'])) allowmaj = package_array['allowmaj'];
  if (reference && release) {
    if (rpm_check(release:release, cpu:cpu, reference:reference, el_string:el_string, rpm_spec_vers_cmp:rpm_spec_vers_cmp, allowmaj:allowmaj)) flag++;
  }
}

if (flag)
{
  security_report_v4(
      port       : 0,
      severity   : SECURITY_HOLE,
      extra      : rpm_report_get()
  );
  exit(0);
}
else
{
  var tested = pkg_tests_get();
  if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
  else audit(AUDIT_PACKAGE_NOT_INSTALLED, "httpd / httpd-debuginfo / httpd-devel / etc");
}

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/al2_ALAS-2021-1716.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\al2_ALAS-2021-1716.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/al2_ALAS-2021-1716.nasl

Go back to menu.

How to Run


Here is how to run the Amazon Linux 2 : httpd (ALAS-2021-1716) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Amazon Linux Local Security Checks plugin family.
  6. On the right side table select Amazon Linux 2 : httpd (ALAS-2021-1716) plugin ID 154179.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl al2_ALAS-2021-1716.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a al2_ALAS-2021-1716.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - al2_ALAS-2021-1716.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state al2_ALAS-2021-1716.nasl -t <IP/HOST>

Go back to menu.

References


IAVA | Information Assurance Vulnerability Alert:
  • 2021-A-0440-S, 2021-A-0451-S
ALAS | Amazon Linux Security Advisory: See also: Similar and related Nessus plugins:
  • 153939 - Photon OS 3.0: Httpd PHSA-2021-3.0-0305
  • 153940 - RHEL 7 : Red Hat JBoss Core Services Apache HTTP Server 2.4.37 SP9 (RHSA-2021:3746)
  • 153952 - Apache 2.4.49 < 2.4.51 Path Traversal Vulnerability
  • 153957 - Photon OS 1.0: Httpd PHSA-2021-1.0-0437
  • 153961 - Photon OS 3.0: Httpd PHSA-2021-3.0-0309
  • 153962 - Photon OS 2.0: Httpd PHSA-2021-2.0-0399
  • 153970 - Debian DSA-4982-1 : apache2 - security update
  • 153983 - FreeBSD : Apache httpd -- Path Traversal and Remote Code Execution (d001c189-2793-11ec-8fb1-206a8a720317)
  • 154019 - RHEL 7 : httpd24-httpd (RHSA-2021:3754)
  • 154050 - CentOS 8 : httpd:2.4 (CESA-2021:3816)
  • 154067 - SUSE SLES15 Security Update : apache2 (SUSE-SU-2021:3335-1)
  • 154078 - RHEL 8 : httpd:2.4 (RHSA-2021:3816)
  • 154081 - RHEL 8 : httpd:2.4 (RHSA-2021:3836)
  • 154082 - RHEL 8 : httpd:2.4 (RHSA-2021:3837)
  • 154128 - Oracle Linux 8 : httpd:2.4 (ELSA-2021-3816)
  • 154164 - Oracle Linux 7 : httpd (ELSA-2021-3856)
  • 154168 - RHEL 7 : httpd (RHSA-2021:3856)
  • 154188 - Amazon Linux AMI : httpd24 (ALAS-2021-1543)
  • 154240 - Tenable SecurityCenter 5.16.0 < 5.19.2 Multiple Vulnerabilities (TNS-2021-17)
  • 154589 - openSUSE 15 Security Update : apache2 (openSUSE-SU-2021:3522-1)
  • 154632 - SUSE SLED15 / SLES15 Security Update : apache2 (SUSE-SU-2021:3522-1)
  • 154867 - openSUSE 15 Security Update : apache2 (openSUSE-SU-2021:1438-1)
  • 155541 - CentOS 7 : httpd (CESA-2021:3856)
  • 155600 - Apache HTTP Server 2.4.49 & 2.4.50 Path Traversal (CVE-2021-42013)
  • 156311 - EulerOS 2.0 SP8 : httpd (EulerOS-SA-2021-2803)
  • 156355 - EulerOS Virtualization 3.0.2.0 : httpd (EulerOS-SA-2021-2832)
  • 156400 - EulerOS 2.0 SP9 : httpd (EulerOS-SA-2021-2915)
  • 156410 - EulerOS 2.0 SP9 : httpd (EulerOS-SA-2021-2923)
  • 156428 - EulerOS 2.0 SP5 : httpd (EulerOS-SA-2021-2931)
  • 156774 - RHEL 7 : httpd (RHSA-2022:0143)
  • 156797 - Oracle Linux 7 : httpd (ELSA-2022-0143)
  • 156803 - Scientific Linux Security Update : httpd on SL7.x x86_64 (2022:0143)
  • 156944 - Oracle HTTP Server (Jan 2022 CPU)
  • 157118 - CentOS 7 : httpd (CESA-2022:0143)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file al2_ALAS-2021-1716.nasl version 1.10. For more plugins, visit the Nessus Plugin Library.

Go back to menu.