Vulnerability Name:

CVE-2021-21374 (CCN-198948)

Assigned:2020-12-22
Published:2021-03-26
Updated:2021-03-30
Summary: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.
CVSS v3 Severity:8.1 High (CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H)
7.1 High (Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): High
Privileges Required (PR): None
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): High
Integrity (I): High
Availibility (A): High
8.1 High (CCN CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:L)
7.1 High (CCN Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:L/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): High
Privileges Required (PR): None
User Interaction (UI): None
Scope:Scope (S): Changed
Impact Metrics:Confidentiality (C): Low
Integrity (I): High
Availibility (A): Low
CVSS v2 Severity:6.8 Medium (CVSS v2 Vector: AV:N/AC:M/Au:N/C:P/I:P/A:P)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Medium
Authentication (Au): None
Impact Metrics:Confidentiality (C): Partial
Integrity (I): Partial
Availibility (A): Partial
6.6 Medium (CCN CVSS v2 Vector: AV:N/AC:H/Au:N/C:P/I:C/A:P)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): High
Athentication (Au): None
Impact Metrics:Confidentiality (C): Partial
Integrity (I): Complete
Availibility (A): Partial
Vulnerability Type:CWE-295
CWE-348
CWE-349
CWE-599
Vulnerability Consequences:Gain Access
References:Source: MITRE
Type: CNA
CVE-2021-21374

Source: MISC
Type: Exploit, Third Party Advisory
https://consensys.net/diligence/vulnerabilities/nim-insecure-ssl-tls-defaults-remote-code-execution/

Source: XF
Type: UNKNOWN
nimlang-cve202121374-code-exec(198948)

Source: MISC
Type: Patch, Third Party Advisory
https://github.com/nim-lang/Nim/pull/16940

Source: MISC
Type: Release Notes, Third Party Advisory
https://github.com/nim-lang/nimble/blob/master/changelog.markdown#0130

Source: CCN
Type: Nimble GIT Repository
Nimble fails to validate certificates due to insecure httpClient defaults

Source: CONFIRM
Type: Third Party Advisory
https://github.com/nim-lang/security/security/advisories/GHSA-c2wm-v66h-xhxx

Source: CCN
Type: WhiteSource Vulnerability Database
CVE-2021-21374

Vulnerable Configuration:Configuration 1:
  • cpe:/a:nim-lang:nim:*:*:*:*:*:*:*:* (Version < 1.2.10)
  • OR cpe:/a:nim-lang:nim:*:*:*:*:*:*:*:* (Version >= 1.4.0 and < 1.4.4)

  • * Denotes that component is vulnerable
    Oval Definitions
    Definition IDClassTitleLast Modified
    oval:org.opensuse.security:def:428
    P
    Security update for nim (Important)
    2022-08-27
    oval:org.opensuse.security:def:113032
    P
    nim-1.2.12-1.7 on GA media (Moderate)
    2022-01-17
    oval:org.opensuse.security:def:106475
    P
    nim-1.2.12-1.7 on GA media (Moderate)
    2021-10-01
    oval:org.opensuse.security:def:11204
    P
    Security update for nim (Moderate)
    2021-04-29
    oval:org.opensuse.security:def:96472
    P
    Security update for nim (Moderate)
    2021-04-29
    oval:org.opensuse.security:def:103162
    P
    Security update for nim (Moderate)
    2021-04-29
    oval:org.opensuse.security:def:109819
    P
    Security update for nim (Moderate)
    2021-04-29
    oval:org.opensuse.security:def:111345
    P
    Security update for nim (Moderate)
    2021-04-25
    BACK
    nim-lang nim *
    nim-lang nim *