Every CVE Search/ Get API key

CVE-2021-21374

Nimble fails to validate certificates due to insecure httpClient defaults

8.1 HighFix available

Nimble is a package manager for the Nim programming language. In Nim release versions before versions 1.2.10 and 1.4.4, "nimble refresh" fetches a list of Nimble packages over HTTPS without full verification of the SSL/TLS certificate due to the default setting of httpClient. An attacker able to perform MitM can deliver a modified package list containing malicious software packages. If the packages are installed and used the attack escalates to untrusted code execution.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
Low
Integrity
High
Availability
Low

Exploit likelihood

1.04%Down 0.8 points since Apr 14, 2021
90%50%10%1%

What each source reports

CVE List Score used 8.1

Nimble fails to validate certificates due to insecure httpClient defaults

Nimble is a package manager for the Nim programming language. In Nim release versions before versions 1.2.10 and 1.4.4, "nimble refresh" fetches a list of Nimble packages over HTTPS without full verification of the SSL/TLS certificate due to the default setting of httpClient. An attacker able to perform MitM can deliver a modified package list containing malicious software packages. If the packages are installed and used the attack escalates to untrusted code execution.

Record
CVE-2021-21374
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:L
Weakness
CWE-348, CWE-599, CWE-349
Updated
2026-11-02
EUVDEUVD-2021-8684 8.1

Nimble is a package manager for the Nim programming language. In Nim release versions before versions 1.2.10 and 1.4.4, "nimble refresh" fetches a list of Nimble packages over HTTPS without full verification of the SSL/TLS certificate due to the default setting of httpClient. An attacker able to perform MitM can deliver a modified package list containing malicious software packages. If the packages are installed and used the attack escalates to untrusted code execution.

Record
EUVD-2021-8684
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:L
Updated
2026-11-03
NVD 8.1

Nimble is a package manager for the Nim programming language. In Nim release versions before versions 1.2.10 and 1.4.4, "nimble refresh" fetches a list of Nimble packages over HTTPS without full verification of the SSL/TLS certificate due to the default setting of httpClient. An attacker able to perform MitM can deliver a modified package list containing malicious software packages. If the packages are installed and used the attack escalates to untrusted code execution.

Record
CVE-2021-21374
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:L
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.0
6.8 MediumAV:N/AC:M/Au:N/C:P/I:P/A:P
Weakness
CWE-348, CWE-349, CWE-599, CWE-295
Updated
2026-11-02
OSV 8.1

Nimble is a package manager for the Nim programming language. In Nim release versions before versions 1.2.10 and 1.4.4, "nimble refresh" fetches a list of Nimble packages over HTTPS without full verification of the SSL/TLS certificate due to the default setting of httpClient. An attacker able to perform MitM can deliver a modified package list containing malicious software packages. If the packages are installed and used the attack escalates to untrusted code execution.

Record
CVE-2021-21374
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-21374 8.1

Nimble is a package manager for the Nim programming language. In Nim release versions before versions 1.2.10 and 1.4.4, "nimble refresh" fetches a list of Nimble packages over HTTPS without full verification of the SSL/TLS certificate due to the default setting of httpClient. An attacker able to perform MitM can deliver a modified package list containing malicious software packages. If the packages are installed and used the attack escalates to untrusted code execution.

Record
DEBIAN-CVE-2021-21374
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2021-21374 8.1

Nimble is a package manager for the Nim programming language. In Nim release versions before versions 1.2.10 and 1.4.4, "nimble refresh" fetches a list of Nimble packages over HTTPS without full verification of the SSL/TLS certificate due to the default setting of httpClient. An attacker able to perform MitM can deliver a modified package list containing malicious software packages. If the packages are installed and used the attack escalates to untrusted code execution.

Record
UBUNTU-CVE-2021-21374
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:L
CVSS 3.1
8.1 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
Show 5 moreShow less
OSVopenSUSE-SU-2021:0618-1 No score

Security update for nim

This update for nim fixes the following issues:

num was updated to version 1.2.12:

  • Fixed GC crash resulting from inlining of the memory allocation procs
  • Fixed “incorrect raises effect for $(NimNode)” (#17454)

From version 1.2.10:

  • Fixed “JS backend doesn’t handle float->int type conversion “ (#8404)
  • Fixed “The “try except” not work when the “OSError: Too many open files” error occurs!” (#15925)
  • Fixed “Nim emits #line 0 C preprocessor directives with –debugger:native, with ICE in gcc-10” (#15942)
  • Fixed “tfuturevar fails when activated” (#9695)
  • Fixed “nre.escapeRe is not gcsafe” (#16103)
  • Fixed ““Error: internal error: genRecordFieldAux” - in the “version-1-4” branch” (#16069)
  • Fixed “-d:fulldebug switch does not compile with gc:arc” (#16214)
  • Fixed “osLastError may randomly raise defect and crash” (#16359)
  • Fixed “generic importc proc’s don’t work (breaking lots of vmops procs for js)” (#16428)
  • Fixed “Concept: codegen ignores parameter passing” (#16897)
  • Fixed “{.push exportc.} interacts with anonymous functions” (#16967)
  • Fixed “memory allocation during {.global.} init breaks GC” (#17085)
  • Fixed 'Nimble arbitrary code execution for specially crafted package metadata'
  • Fixed 'Nimble falls back to insecure http url when fetching packages'
  • Fixed 'Nimble fails to validate certificates due to insecure httpClient defaults'

from version 1.2.8

  • Fixed “Defer and –gc:arc” (#15071)
  • Fixed “Issue with –gc:arc at compile time” (#15129)
  • Fixed “Nil check on each field fails in generic function” (#15101)
  • Fixed “[strscans] scanf doesn’t match a single character with $+ if it’s the end of the string” (#15064)
  • Fixed “Crash and incorrect return values when using readPasswordFromStdin on Windows.” (#15207)
  • Fixed “Inconsistent unsigned -> signed RangeDefect usage across integer sizes” (#15210)
  • Fixed “toHex results in RangeDefect exception when used with large uint64” (#15257)
  • Fixed “Mixing ‘return’ with expressions is allowed in 1.2” (#15280)
  • Fixed “proc execCmdEx doesn’t work with -d:useWinAnsi” (#14203)
  • Fixed “memory corruption in tmarshall.nim” (#9754)
  • Fixed “Wrong number of variables” (#15360)
  • Fixed “defer doesnt work with block, break and await” (#15243)
  • Fixed “Sizeof of case object is incorrect. Showstopper” (#15516)
  • Fixed “Mixing ‘return’ with expressions is allowed in 1.2” (#15280)
  • Fixed “regression(1.0.2 => 1.0.4) VM register messed up depending on unrelated context” (#15704)

from version 1.2.6

  • Fixed “The pegs module doesn’t work with generics!” (#14718)
  • Fixed “[goto exceptions] {.noReturn.} pragma is not detected in a case expression” (#14458)
  • Fixed “[exceptions:goto] C compiler error with dynlib pragma calling a proc” (#14240)
  • Fixed “Nim source archive install: ‘install.sh’ fails with error: cp: cannot stat ‘bin/nim-gdb’: No such file or directory” (#14748)
  • Fixed “Stropped identifiers don’t work as field names in tuple literals” (#14911)
  • Fixed “uri.decodeUrl crashes on incorrectly formatted input” (#14082)
  • Fixed “odbcsql module has some wrong integer types” (#9771)
  • Fixed “[ARC] Compiler crash declaring a finalizer proc directly in ‘new’” (#15044)
  • Fixed “code with named arguments in proc of winim/com can not been compiled” (#15056)
  • Fixed “javascript backend produces javascript code with syntax error in object syntax” (#14534)
  • Fixed “[ARC] SIGSEGV when calling a closure as a…
Record
openSUSE-SU-2021:0618-1
Updated
2026-11-02
OSVopenSUSE-SU-2021:0628-1 No score

Security update for nim

This update for nim fixes the following issues:

num was updated to version 1.2.12:

  • Fixed GC crash resulting from inlining of the memory allocation procs
  • Fixed “incorrect raises effect for $(NimNode)” (#17454)

From version 1.2.10:

  • Fixed “JS backend doesn’t handle float->int type conversion “ (#8404)
  • Fixed “The “try except” not work when the “OSError: Too many open files” error occurs!” (#15925)
  • Fixed “Nim emits #line 0 C preprocessor directives with –debugger:native, with ICE in gcc-10” (#15942)
  • Fixed “tfuturevar fails when activated” (#9695)
  • Fixed “nre.escapeRe is not gcsafe” (#16103)
  • Fixed ““Error: internal error: genRecordFieldAux” - in the “version-1-4” branch” (#16069)
  • Fixed “-d:fulldebug switch does not compile with gc:arc” (#16214)
  • Fixed “osLastError may randomly raise defect and crash” (#16359)
  • Fixed “generic importc proc’s don’t work (breaking lots of vmops procs for js)” (#16428)
  • Fixed “Concept: codegen ignores parameter passing” (#16897)
  • Fixed “{.push exportc.} interacts with anonymous functions” (#16967)
  • Fixed “memory allocation during {.global.} init breaks GC” (#17085)
  • Fixed 'Nimble arbitrary code execution for specially crafted package metadata'
  • Fixed 'Nimble falls back to insecure http url when fetching packages'
  • Fixed 'Nimble fails to validate certificates due to insecure httpClient defaults'

from version 1.2.8

  • Fixed “Defer and –gc:arc” (#15071)
  • Fixed “Issue with –gc:arc at compile time” (#15129)
  • Fixed “Nil check on each field fails in generic function” (#15101)
  • Fixed “[strscans] scanf doesn’t match a single character with $+ if it’s the end of the string” (#15064)
  • Fixed “Crash and incorrect return values when using readPasswordFromStdin on Windows.” (#15207)
  • Fixed “Inconsistent unsigned -> signed RangeDefect usage across integer sizes” (#15210)
  • Fixed “toHex results in RangeDefect exception when used with large uint64” (#15257)
  • Fixed “Mixing ‘return’ with expressions is allowed in 1.2” (#15280)
  • Fixed “proc execCmdEx doesn’t work with -d:useWinAnsi” (#14203)
  • Fixed “memory corruption in tmarshall.nim” (#9754)
  • Fixed “Wrong number of variables” (#15360)
  • Fixed “defer doesnt work with block, break and await” (#15243)
  • Fixed “Sizeof of case object is incorrect. Showstopper” (#15516)
  • Fixed “Mixing ‘return’ with expressions is allowed in 1.2” (#15280)
  • Fixed “regression(1.0.2 => 1.0.4) VM register messed up depending on unrelated context” (#15704)

from version 1.2.6

  • Fixed “The pegs module doesn’t work with generics!” (#14718)
  • Fixed “[goto exceptions] {.noReturn.} pragma is not detected in a case expression” (#14458)
  • Fixed “[exceptions:goto] C compiler error with dynlib pragma calling a proc” (#14240)
  • Fixed “Nim source archive install: ‘install.sh’ fails with error: cp: cannot stat ‘bin/nim-gdb’: No such file or directory” (#14748)
  • Fixed “Stropped identifiers don’t work as field names in tuple literals” (#14911)
  • Fixed “uri.decodeUrl crashes on incorrectly formatted input” (#14082)
  • Fixed “odbcsql module has some wrong integer types” (#9771)
  • Fixed “[ARC] Compiler crash declaring a finalizer proc directly in ‘new’” (#15044)
  • Fixed “code with named arguments in proc of winim/com can not been compiled” (#15056)
  • Fixed “javascript backend produces javascript code with syntax error in object syntax” (#14534)
  • Fixed “[ARC] SIGSEGV when calling a closure as a…
Record
openSUSE-SU-2021:0628-1
Updated
2026-11-02
OSVopenSUSE-SU-2022:10095-1 No score

Security update for nim

This update for nim fixes the following issues:

Includes upstream security fixes for:

  • (boo#1175333, CVE-2020-15693) httpClient is vulnerable to a CR-LF injection
  • (boo#1175334, CVE-2020-15692) mishandle of argument to browsers.openDefaultBrowser
  • (boo#1175332, CVE-2020-15694) httpClient.get().contentLength() fails to properly validate the server response
  • (boo#1192712, CVE-2021-41259) null byte accepted in getContent function, leading to URI validation bypass
  • (boo#1185948, CVE-2021-29495) stdlib httpClient does not validate peer certificates by default
  • (boo#1185085, CVE-2021-21374) Improper verification of the SSL/TLS certificate
  • (boo#1185084, CVE-2021-21373) 'nimble refresh' falls back to a non-TLS URL in case of error
  • (boo#1185083, CVE-2021-21372) doCmd can be leveraged to execute arbitrary commands
  • (boo#1181705, CVE-2020-15690) Standard library asyncftpclient lacks a check for newline character

Following nim tools now work as expected:

  • nim_dbg is now installed.
  • nim-gdb can be successfully launched as it finds and loads nim-gdb.py correctly under gdb.
  • nimble package manager stores package information per user.
  • compiler package can be found and used, as it may be required by other packages.

Update to 1.6.6

  • standard library use consistent styles for variable names so it can be used in projects which force a consistent style with --styleCheck:usages option.
  • ARC/ORC are now considerably faster at method dispatching, bringing its performance back on the level of the refc memory management.
  • Full changelog: https://nim-lang.org/blog/2022/05/05/version-166-released.html
  • Previous updates and changelogs:

Update to 1.2.16

  • oids: switch from PRNG to random module
  • nimc.rst: fix table markup
  • nimRawSetjmp: support Windows
  • correctly enable chronos
  • bigints are not supposed to work on 1.2.x
  • disable nimpy
  • misc bugfixes
  • fixes a 'mixin' statement handling regression [backport:1.2

Update to version 1.2.12

  • Fixed GC crash resulting from inlining of the memory allocation procs
  • Fixed “incorrect raises effect for $(NimNode)” (#17454)
  • from version 1.2.10
  • Fixed “JS backend doesn’t handle float->int type conversion “ (#8404)
  • Fixed “The “try except” not work when the “OSError: Too many open files” error occurs!” (#15925)
  • Fixed “Nim emits #line 0 C preprocessor directives with –debugger:native, with ICE in gcc-10” (#15942)
  • Fixed “tfuturevar fails when activated” (#9695)
  • Fixed “nre.escapeRe is not gcsafe” (#16103)
  • Fixed ““Error: internal error: genRecordFieldAux” - in the “version-1-4” branch” (#16069)
  • Fixed “-d:fulldebug switch does not compile with gc:arc” (#16214)
  • Fixed “osLastError may randomly raise defect and crash” (#16359)
  • Fixed “generic importc proc’s don’t work (breaking lots of vmops procs for js)” (#16428)
  • Fixed “Concept: codegen ignores parameter passing” (#16897)
  • Fixed “{.push exportc.} interacts with anonymous functions” (#16967)
  • Fixed “memory allocation during {.global.} init breaks GC” (#17085)
  • Fixed 'Nimble arbitrary code execution for specially crafted package metadata'
  • Fixed 'Nimble falls back to…
Record
openSUSE-SU-2022:10095-1
Updated
2026-11-02
OSVopenSUSE-SU-2022:10101-1 No score

Security update for nim

This update for nim fixes the following issues:

Includes upstream security fixes for:

  • (boo#1175333, CVE-2020-15693) httpClient is vulnerable to a CR-LF injection
  • (boo#1175334, CVE-2020-15692) mishandle of argument to browsers.openDefaultBrowser
  • (boo#1175332, CVE-2020-15694) httpClient.get().contentLength() fails to properly validate the server response
  • (boo#1192712, CVE-2021-41259) null byte accepted in getContent function, leading to URI validation bypass
  • (boo#1185948, CVE-2021-29495) stdlib httpClient does not validate peer certificates by default
  • (boo#1185085, CVE-2021-21374) Improper verification of the SSL/TLS certificate
  • (boo#1185084, CVE-2021-21373) 'nimble refresh' falls back to a non-TLS URL in case of error
  • (boo#1185083, CVE-2021-21372) doCmd can be leveraged to execute arbitrary commands
  • (boo#1181705, CVE-2020-15690) Standard library asyncftpclient lacks a check for newline character

Update to 1.6.6

  • standard library use consistent styles for variable names so it can be used in projects which force a consistent style with --styleCheck:usages option.
  • ARC/ORC are now considerably faster at method dispatching, bringing its performance back on the level of the refc memory management.
  • Full changelog: https://nim-lang.org/blog/2022/05/05/version-166-released.html
  • Previous updates and changelogs:

update to 1.2.16

  • oids: switch from PRNG to random module
  • nimc.rst: fix table markup
  • nimRawSetjmp: support Windows
  • correctly enable chronos
  • bigints are not supposed to work on 1.2.x
  • disable nimpy
  • misc bugfixes
  • fixes a 'mixin' statement handling regression [backport:1.2
Record
openSUSE-SU-2022:10101-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:11093-1 No score

nim-1.2.12-1.7 on GA media

These are all security issues fixed in the nim-1.2.12-1.7 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:11093-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
nim
Debian:12
before 1.4.6+really1.4.2-1
1.4.6+really1.4.2-1
nim
Debian:14
before 1.4.6+really1.4.2-1, plus listed versions
0.11.2+dfsg1-10.11.2+dfsg1-20.11.2+dfsg1-30.11.2+dfsg1-40.12.0-1
Show 45 moreShow less
0.12.0-20.13.0-10.14.2-10.15.0-10.15.0-20.15.0-30.15.2-10.15.2-20.16.0-10.17.0-10.17.0-20.17.0-2~bpo9+10.17.2-10.18.0-10.18.0-20.19.0-10.19.2-10.19.2-20.19.4-10.19.6-10.19.6-20.20.0-10.20.0-20.20.2-11.0.0-11.0.0-1~bpo10+11.0.2-11.0.2-1~bpo10+11.0.2~a-11.0.2~b-11.0.2~rc-11.0.3~rc-11.0.4-11.0.4-1~bpo10+11.0.5~rc-11.0.6-11.2.0-11.2.0~rc-11.2.0~rc2-11.2.0~rc3-11.2.1~rc1-11.2.1~rc2-11.2.2-11.2.4-11.2.6-1
1.4.6+really1.4.2-1
nim
Ubuntu:16.04:LTS
All versions, plus listed versions
0.11.2+dfsg1-40.12.0-2
None known
nim
Ubuntu:18.04:LTS
All versions, plus listed versions
0.17.2-1ubuntu10.17.2-1ubuntu2
None known
nim
Ubuntu:20.04:LTS
All versions, plus listed versions
0.20.2-11.0.2-11.0.3~rc-11.0.4-11.0.6-1
None known
nim
Ubuntu:24.04:LTS
All versions, plus listed versions
1.6.14-11.6.14-1ubuntu11.6.14-1ubuntu2
None known
nim
Ubuntu:25.10
All versions, plus listed versions
1.6.14-1ubuntu22.2.4-1
None known
nim
Ubuntu:26.10
All versions, plus listed versions
2.2.4-22.2.10-1
None known
nim
Ubuntu:26.04:LTS
All versions, plus listed versions
2.2.4-12.2.4-2
None known
nim
openSUSE:Leap 15.2
From an advisory covering 3 CVEs
before 1.2.12-lp152.2.3.1
1.2.12-lp152.2.3.1
Show 6 moreShow less
Affected packages
PackageAffectedFixed
nim
SUSE:Package Hub 15 SP2
From an advisory covering 3 CVEs
before 1.2.12-bp152.4.3.1
1.2.12-bp152.4.3.1
nim
SUSE:Package Hub 15 SP3
From an advisory covering 9 CVEs
before 1.6.6-bp153.2.3.1
1.6.6-bp153.2.3.1
nim
openSUSE:Leap 15.3
From an advisory covering 9 CVEs
before 1.6.6-bp153.2.3.1
1.6.6-bp153.2.3.1
nim
SUSE:Package Hub 15 SP4
From an advisory covering 9 CVEs
before 1.6.6-bp154.2.3.1
1.6.6-bp154.2.3.1
nim
openSUSE:Leap 15.4
From an advisory covering 9 CVEs
before 1.6.6-bp154.2.3.1
1.6.6-bp154.2.3.1
nim
openSUSE:Tumbleweed
From an advisory covering 3 CVEs
before 1.2.12-1.7
1.2.12-1.7

History

History
RecordedChangedSources
affected, facts
aliases, productsEUVD
first indexedCVE List, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-21374 is a high vulnerability (CVSS 8.1) in Nim-lang Nim, published March 26, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.04%, the 64th percentile. Fixed in nim 1.4.6+really1.4.2-1.

References

Show 23 moreShow less
This page doesn't list everything

Left out here: 4 versions and the rest of 3 source descriptions. The JSON record has them.

MoveEnter Open