Description
In Nim 1.2.4, the standard library httpClient fails to properly validate the server response. For example, httpClient.get().contentLength() does not raise any error if a malicious server provides a negative Content-Length.
References (4)
Core 4
Core References
Patch, Third Party Advisory x_refsource_misc
https://github.com/nim-lang/Nim/blob/dc5a40f3f39c6ea672e6dc6aca7f8118a69dda99/lib/pure/httpclient.nim#L241
Release Notes, Third Party Advisory x_refsource_confirm
https://nim-lang.org/blog/2020/07/30/versions-126-and-108-released.html
Exploit, Mailing List, Third Party Advisory mailing-list
x_refsource_mlist
http://www.openwall.com/lists/oss-security/2021/02/04/2
Exploit, Third Party Advisory x_refsource_misc
https://consensys.net/diligence/vulnerabilities/nim-httpclient-header-crlf-injection/
Scores
CVSS v3
7.5
EPSS
0.0109
EPSS Percentile
78.1%
Attack Vector
NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Details
CWE
CWE-20
Status
published
Products (1)
nim-lang/nim
< 1.2.6
Published
Aug 14, 2020
Tracked Since
Feb 18, 2026