The server can influence a file name

curl can save remote content to a local file. Options that use a server-provided file name can affect the destination path and overwrite behaviour. Applications should decide where downloads are written and whether a pre-existing file can be replaced.

The curl 8.23.0 security release included CVE-2026-92390, which involved the command line `-J` no-clobber guarantee and HTTP 103 Early Hints. Check the project advisory for the exact triggering conditions and affected versions.

Choose the destination explicitly

Use a dedicated download directory with restricted permissions. Generate a safe local file name from a trusted identifier instead of accepting path components from a remote response. Check that the destination does not already contain a file that must be preserved.

Validate the downloaded file type and expected size. For software packages, verify a signature or checksum through a trusted channel before installation.

Update curl and test download behaviour

Install a supported curl release and review the project’s security advisories. Test normal downloads, redirects, temporary files and failure cleanup in a controlled environment.

Do not rely on a single command-line option as the full file safety policy. Use filesystem permissions and application checks as well.