Skip to content
Heist/ feed
Back to feed
High

local file overwrite

Type: advisorySources: OSV

curl offers a command line option --remote-header-name (also usable as -J) which uses the filename of the Content-disposition: header when it saves the downloaded data locally. curl attempts to cut off the directory parts from any given filename in the header to only store files in the current directory. It might overwrite a local file using the same name as the header specifies. The stripping of the directory did not take backslashes into account. On some operating systems, backslashes are used to separate directories and filenames. This allows a rogue server to send back a response that overwrites a filename in the local machine that the user is allowed to write, potentially a system file, a command or a known executable. Operating systems affected include Windows, Netware, MSDOS, OS/2 and Symbian. This error is only present in the curl command line tool, it is NOT a problem of the library libcurl.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2010-3842
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 14:10 UTC · Revision 1

Source evidence

local file overwrite

core-osv · Original source

Published 13 Oct 2010, 08:00 UTC

curl offers a command line option --remote-header-name (also usable as -J) which uses the filename of the Content-disposition: header when it saves the downloaded data locally. curl attempts to cut off the directory parts from any given filename in the header to only store files in the current directory. It might overwrite a local file using the same name as the header specifies. The stripping of the directory did not take backslashes into account. On some operating systems, backslashes are used to separate directories and filenames. This allows a rogue server to send back a response that overwrites a filename in the local machine that the user is allowed to write, potentially a system file, a command or a known executable. Operating systems affected include Windows, Netware, MSDOS, OS/2 and Symbian. This error is only present in the curl command line tool, it is NOT a problem of the library libcurl.

osv:CURL-CVE-2010-3842
Complete source record
{
  "id": "172c34e0594a55ed78878ffc1e9177985f8f473a44f77533072b80a8c88feb11",
  "url": "https://osv.dev/vulnerability/CURL-CVE-2010-3842",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "local file overwrite",
    "summary": "curl offers a command line option --remote-header-name (also usable as -J) which uses the filename of the Content-disposition: header when it saves the downloaded data locally. curl attempts to cut off the directory parts from any given filename in the header to only store files in the current directory. It might overwrite a local file using the same name as the header specifies. The stripping of the directory did not take backslashes into account. On some operating systems, backslashes are used to separate directories and filenames. This allows a rogue server to send back a response that overwrites a filename in the local machine that the user is allowed to write, potentially a system file, a command or a known executable. Operating systems affected include Windows, Netware, MSDOS, OS/2 and Symbian. This error is only present in the curl command line tool, it is NOT a problem of the library libcurl.",
    "evidence": "osv:CURL-CVE-2010-3842",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CURL-CVE-2010-3842",
      "aliases": [
        "CURL-CVE-2010-3842",
        "CVE-2010-3842"
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "7.20.0"
                },
                {
                  "fixed": "7.21.2"
                }
              ]
            },
            {
              "repo": "https://github.com/curl/curl.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "80675818e0417be8c991513b328c5507e93b47e5"
                },
                {
                  "fixed": "81f151c912105ded480c3c88a1be53ca345298a1"
                }
              ]
            }
          ],
          "versions": [
            "7.21.1",
            "7.21.0",
            "7.20.1",
            "7.20.0",
            "curl-7_21_1",
            "curl-7_21_0",
            "curl-7_20_1",
            "curl-7_20_0"
          ],
          "database_specific": {
            "source": "https://curl.se/docs/CURL-CVE-2010-3842.json",
            "vanir_signatures": [
              {
                "id": "CURL-CVE-2010-3842-a8357723",
                "digest": {
                  "length": 713,
                  "function_hash": "113905634619107869494585090424042333659"
                },
                "source": "https://github.com/curl/curl.git/commit/81f151c912105ded480c3c88a1be53ca345298a1",
                "target": {
                  "file": "src/main.c",
                  "function": "parse_filename"
                },
                "deprecated": false,
                "signature_type": "Function",
                "signature_version": "v1"
              }
            ],
            "vanir_signatures_modified": "2026-10-26T13:07:53Z"
          }
        }
      ],
      "modified": "2026-10-26T13:07:53.353919490Z",
      "provider": "osv",
      "references": [],
      "provider_metadata": {
        "CWE": {
          "id": "CWE-30",
          "desc": "Path Traversal"
        },
        "URL": "https://curl.se/docs/CVE-2010-3842.json",
        "www": "https://curl.se/docs/CVE-2010-3842.html",
        "affects": "tool",
        "package": "curl",
        "severity": "High",
        "last_affected": "7.21.1"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2010-3842",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 453273,
  "published_at": "2010-10-13T08:00:00+00:00"
}