#VU53543 Off-by-one in nginx - CVE-2021-23017

 

#VU53543 Off-by-one in nginx - CVE-2021-23017

Published: May 25, 2021 / Updated: July 31, 2022


Vulnerability identifier: #VU53543
Vulnerability risk: High
CVSSv4.0: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P/U:Amber
CVE-ID: CVE-2021-23017
CWE-ID: CWE-193
Exploitation vector: Remote access
Exploit availability: Public exploit is available
Vulnerable software:
nginx
Software vendor:
F5 Networks

Description

The vulnerability allows a remote attacker to execute arbitrary code on the target system.

The vulnerability exists due to an off-by-one error within the ngx_resolver_copy() function when processing DNS responses. A remote attacker can trigger an off-by-one error, write a dot character (‘.’, 0x2E) out of bounds in a heap allocated buffer and execute arbitrary code on the system.

Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.

The vulnerability can be triggered by a DNS response in reply to a DNS request from nginx when the resolver primitive is configured. A specially crafted packet allows overwriting the least significant byte of next heap chunk metadata with 0x2E.


Remediation

Install updates from vendor's website.

External links