Improper Authentication Affecting nixos/nix package, versions [,2.24.8)


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.05% (17th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-UNMANAGED-NIXOSNIX-8102595
  • published 27 Sep 2024
  • disclosed 26 Sep 2024
  • credit Pierre-Etienne Meunier

How to fix?

Upgrade nixos/nix to version 2.24.8 or higher.

Overview

Affected versions of this package are vulnerable to Improper Authentication due to the improper verification of TLS certificates in the builtin:fetchurl derivation builder. An attacker can intercept HTTPS connections and potentially access sensitive information by exploiting this vulnerability in a man-in-the-middle attack.

Note: This is only exploitable if the user has a netrc file for authentication or relies on derivations with impureEnvVars set to use credentials from the environment.

Workaround

This vulnerability can be mitigated by using pkgs.fetchurl from Nixpkgs with impureEnvVars and curlOpts as needed.

CVSS Scores

version 4.0
version 3.1
Expand this section

Snyk

Recommended
8.2 high
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Attack Requirements (AT)
    Present
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Confidentiality (VC)
    High
  • Integrity (VI)
    None
  • Availability (VA)
    None
  • Confidentiality (SC)
    None
  • Integrity (SI)
    None
  • Availability (SA)
    None