CURL-CVE-2022-27778

Source
https://curl.se/docs/CVE-2022-27778.html
Import Source
https://curl.se/docs/CURL-CVE-2022-27778.json
JSON Data
https://api.test.osv.dev/v1/vulns/CURL-CVE-2022-27778
Aliases
Published
2022-05-11T08:00:00Z
Modified
2026-05-29T05:40:35Z
Summary
curl removes wrong file on error
Details

curl might remove the wrong file when --no-clobber is used together with --remove-on-error.

The --remove-on-error option tells curl to remove the output file when it returns an error, and not leave a partial file behind. The --no-clobber option prevents curl from overwriting a file if it already exists, and instead appends a number to the name to create a new unused filename.

If curl adds a number to not "clobber" the output and an error occurs during transfer, the remove on error logic would remove the original filename without the added number.

Database specific
{
    "CWE":  {
        "desc":  "Use of Incorrectly-Resolved Name or Reference",
        "id":  "CWE-706"
    },
    "URL":  "https://curl.se/docs/CVE-2022-27778.json",
    "affects":  "tool",
    "award":  {
        "amount":  "2400",
        "currency":  "USD"
    },
    "issue":  "https://hackerone.com/reports/1553598",
    "last_affected":  "7.83.0",
    "package":  "curl",
    "severity":  "Medium",
    "www":  "https://curl.se/docs/CVE-2022-27778.html"
}
Credits
    • Harry Sintonen - FINDER
    • Daniel Stenberg - REMEDIATION_DEVELOPER

Affected packages

Git / github.com/curl/curl.git

Affected ranges

Type
SEMVER
Events
Introduced
7.83.0
Fixed
7.83.1
Type
GIT
Repo
https://github.com/curl/curl.git
Events

Affected versions

7.*
7.83.0
Other
curl-7_83_0

Database specific

source
"https://curl.se/docs/CURL-CVE-2022-27778.json"
vanir_signatures
[
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "85408876570462900799251503454664716257",
            "length":  6410
        },
        "id":  "CURL-CVE-2022-27778-9148cdfd",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/curl/curl.git/commit/8c7ee9083d0d719d0a77ab20d9cc2ae84eeea7f3",
        "target":  {
            "file":  "src/tool_operate.c",
            "function":  "post_per_transfer"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "308290438098808885868234172283327916718",
                "110527128123582844957959740984418015675",
                "190011922085424159656563209537929965832",
                "98802887095136528853448725169130886710",
                "135643845906234530904486303925015482682"
            ],
            "threshold":  0.9
        },
        "id":  "CURL-CVE-2022-27778-ad869ebd",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/curl/curl.git/commit/8c7ee9083d0d719d0a77ab20d9cc2ae84eeea7f3",
        "target":  {
            "file":  "src/tool_operate.c"
        }
    }
]
vanir_signatures_modified
"2026-05-29T05:40:35Z"