Skip to content
Heist/ feed
Back to feed
Low

netrc and default credential leak

Type: advisorySources: OSV

When asked to use a `.netrc` file for credentials **and** to follow HTTP redirects, curl could leak the password used for the first host to the followed-to host under certain circumstances. This flaw only manifests itself if the netrc file has a `default` entry that omits both login and password. A rare circumstance.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-0167
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 09:37 UTC · Revision 1

Source evidence

netrc and default credential leak

core-osv · Original source

Published 5 Feb 2025, 08:00 UTC

When asked to use a `.netrc` file for credentials **and** to follow HTTP redirects, curl could leak the password used for the first host to the followed-to host under certain circumstances. This flaw only manifests itself if the netrc file has a `default` entry that omits both login and password. A rare circumstance.

osv:CURL-CVE-2025-0167
Complete source record
{
  "id": "22fd00b5726fd0892199292bf05d2de49e960f51e5e51fc970c3641cf6467ded",
  "url": "https://osv.dev/vulnerability/CURL-CVE-2025-0167",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "netrc and default credential leak",
    "summary": "When asked to use a `.netrc` file for credentials **and** to follow HTTP redirects, curl could leak the password used for the first host to the followed-to host under certain circumstances. This flaw only manifests itself if the netrc file has a `default` entry that omits both login and password. A rare circumstance.",
    "evidence": "osv:CURL-CVE-2025-0167",
    "products": [],
    "severity": "low",
    "structured": {
      "id": "CURL-CVE-2025-0167",
      "aliases": [
        "CURL-CVE-2025-0167",
        "CVE-2025-0167"
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "7.76.0"
                },
                {
                  "fixed": "8.12.0"
                }
              ]
            },
            {
              "repo": "https://github.com/curl/curl.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "46620b97431e19c53ce82e55055c85830f088cf4"
                },
                {
                  "fixed": "0e120c5b925e8ca75d5319e319e5ce4b8080d8eb"
                }
              ]
            }
          ],
          "versions": [
            "8.11.1",
            "8.11.0",
            "8.10.1",
            "8.10.0",
            "8.9.1",
            "8.9.0",
            "8.8.0",
            "8.7.1",
            "8.7.0",
            "8.6.0",
            "8.5.0",
            "8.4.0",
            "8.3.0",
            "8.2.1",
            "8.2.0",
            "8.1.2",
            "8.1.1",
            "8.1.0",
            "8.0.1",
            "8.0.0",
            "7.88.1",
            "7.88.0",
            "7.87.0",
            "7.86.0",
            "7.85.0",
            "7.84.0",
            "7.83.1",
            "7.83.0",
            "7.82.0",
            "7.81.0",
            "7.80.0",
            "7.79.1",
            "7.79.0",
            "7.78.0",
            "7.77.0",
            "7.76.1",
            "7.76.0",
            "curl-8_11_1",
            "curl-8_11_0",
            "curl-8_10_1",
            "curl-8_10_0",
            "curl-8_9_1",
            "curl-8_9_0",
            "curl-8_8_0",
            "curl-8_7_1",
            "curl-8_7_0",
            "curl-8_6_0",
            "curl-8_5_0",
            "tiny-curl-8_4_0",
            "curl-8_4_0",
            "curl-8_3_0",
            "curl-8_2_1",
            "curl-8_2_0",
            "curl-8_1_2",
            "curl-8_1_1",
            "curl-8_1_0",
            "curl-8_0_1",
            "curl-8_0_0",
            "curl-7_88_1",
            "curl-7_88_0",
            "curl-7_87_0",
            "curl-7_86_0",
            "curl-7_85_0",
            "curl-7_84_0",
            "curl-7_83_1",
            "curl-7_83_0",
            "curl-7_82_0",
            "curl-7_81_0",
            "curl-7_80_0",
            "curl-7_79_1",
            "curl-7_79_0",
            "curl-7_78_0",
            "curl-7_77_0",
            "curl-7_76_1",
            "curl-7_76_0"
          ],
          "database_specific": {
            "source": "https://curl.se/docs/CURL-CVE-2025-0167.json",
            "vanir_signatures": [
              {
                "id": "CURL-CVE-2025-0167-15d6fd1f",
                "digest": {
                  "threshold": 0.9,
                  "line_hashes": [
                    "20458848727035232539463676160844715969",
                    "90706272737080507433274527716916664546",
                    "16917327258350909374225622337481945083",
                    "95294599251604326993271975417061449667",
                    "69955327080921055285093850767477732234",
                    "68948961411026234800199585682669406206",
                    "191585321479983056735666444989778000369"
                  ]
                },
                "source": "https://github.com/curl/curl.git/commit/0e120c5b925e8ca75d5319e319e5ce4b8080d8eb",
                "target": {
                  "file": "lib/netrc.c"
                },
                "deprecated": false,
                "signature_type": "Line",
                "signature_version": "v1"
              },
              {
                "id": "CURL-CVE-2025-0167-9ba894d6",
                "digest": {
                  "length": 3446,
                  "function_hash": "7801934723948004267281319048702801809"
                },
                "source": "https://github.com/curl/curl.git/commit/0e120c5b925e8ca75d5319e319e5ce4b8080d8eb",
                "target": {
                  "file": "lib/netrc.c",
                  "function": "parsenetrc"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-25T01:04:41Z"
          }
        }
      ],
      "modified": "2026-10-25T01:04:41.326864769Z",
      "provider": "osv",
      "references": [],
      "provider_metadata": {
        "CWE": {
          "id": "CWE-200",
          "desc": "Exposure of Sensitive Information to an Unauthorized Actor"
        },
        "URL": "https://curl.se/docs/CVE-2025-0167.json",
        "www": "https://curl.se/docs/CVE-2025-0167.html",
        "award": {
          "amount": "505",
          "currency": "USD"
        },
        "issue": "https://hackerone.com/reports/2917232",
        "affects": "both",
        "package": "curl",
        "severity": "Low",
        "last_affected": "8.11.1"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-0167",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 444276,
  "published_at": "2025-02-05T08:00:00+00:00"
}