CVE-2021-41259

Name
CVE-2021-41259
Description
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://localhost\0hello").hostname is set to "localhost\0hello". Additionally, httpclient.getContent accepts null bytes in the input URL and ignores any data after the first null byte. Example: getContent("http://localhost\0hello") makes a request to localhost:80. An attacker can use a null bytes to bypass the check and mount a SSRF attack.
NVD Severity
high
Other trackers
Mailing lists
Exploits
Forges
GitHub (code, issues), Aports (code, issues)

References

Type URI
CONFIRM https://github.com/nim-lang/security/security/advisories/GHSA-3gg2-rw3q-qwgc

Match rules

CPE URI Source package Min version Max version
cpe:2.3:a:nim-lang:nim:1.2.12:*:*:*:*:*:*:* nim == None == 1.2.12
cpe:2.3:a:nim-lang:nim:1.4.4:*:*:*:*:*:*:* nim == None == 1.4.4
cpe:2.3:a:nim-lang:nim:1.4.6:*:*:*:*:*:*:* nim == None == 1.4.6
cpe:2.3:a:nim-lang:nim:1.4.8:*:*:*:*:*:*:* nim == None == 1.4.8
cpe:2.3:a:nim-lang:nim:1.6.0:*:*:*:*:*:*:* nim == None == 1.6.0

Vulnerable and fixed packages

Source package Branch Version Maintainer Status
nim edge-community 1.4.8-r2 Jakub Jirutka <jakub@jirutka.cz> possibly vulnerable