CVE-2021-41259

Nim is a systems programming language with a focus on efficiency, expressiveness, and elegance. In affected versions the uri.parseUri function which may be used to validate URIs accepts null bytes in the input URI. This behavior could be used to bypass URI validation. For example: parseUri("http://localhosthello").hostname is set to "localhosthello". Additionally, httpclient.getContent accepts null bytes in the input URL and ignores any data after the first null byte. Example: getContent("http://localhosthello") makes a request to localhost:80. An attacker can use a null bytes to bypass the check and mount a SSRF attack.
References
Configurations

Configuration 1

cpe:2.3:a:nim-lang:nim:1.2.12:*:*:*:*:*:*:*
cpe:2.3:a:nim-lang:nim:1.4.4:*:*:*:*:*:*:*
cpe:2.3:a:nim-lang:nim:1.4.6:*:*:*:*:*:*:*
cpe:2.3:a:nim-lang:nim:1.4.8:*:*:*:*:*:*:*
cpe:2.3:a:nim-lang:nim:1.6.0:*:*:*:*:*:*:*

Information

Published : 2021-11-12 06:15

Updated : 2021-11-17 03:45


NVD link : CVE-2021-41259

Mitre link : CVE-2021-41259

Products Affected
No products.
CWE
CWE-918

Server-Side Request Forgery (SSRF)