Skip to content
Misconfiguration Disclosed report Advanced CVE-2023-38546

[CVE-2023-38546] cookie injection with none file

A flaw in libcurl's easy handle duplication caused cloned handles to load cookies from a file named 'none' if such a file existed in the current directory. An attacker could inject cookies into a running program using libcurl if the specific conditions were met.

w0x42 Follow

Originally disclosed on HackerOne

  • Triaged in 32 hours
  • Fixed in 11 days
  • Paid in 11 days
  • Disclosed after 35 days

Summary by the program

CVE-2023-38546 - cookie injection with none file VULNERABILITY This flaw allows an attacker to insert cookies at will into a running program using libcurl, if the specific series of conditions are met.

libcurl performs transfers. In its API, an application creates "easy handles" that are the individual handles for single transfers.

libcurl provides a function call that duplicates an easy handle called curl_easy_duphandle.

If a transfer has cookies enabled when the handle is duplicated, the cookie-enable state is also cloned - but without cloning the actual cookies. If the source handle did not read any cookies from a specific file on disk, the cloned version of the handle would instead store the file name as none (using the four ASCII letters, no quotes).

Subsequent use of the cloned handle that does not explicitly set a source to load cookies from would then inadvertently load cookies from a file named none - if such a file exists and is readable in the current directory of the program using libcurl. And if using the correct file format of course.

Full Security Advisory: https://curl.se/docs/CVE-2023-38546.html

The report

https://hackerone.com/reports/2148242

Impact

cookie injection into a program using libcurl, if several conditions are met

The original report as published on HackerOne, by w0x42. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, when duplicating an easy handle with cookies enabled, libcurl copied the cookie file name as the literal string 'none' instead of leaving it unset, causing the cloned handle to load cookies from a file named 'none'.

Impact

An attacker could inject cookies into a program using libcurl, but only if several conditions are met, including the presence of a readable file named 'none' in the current directory.

What the attacker needed

Program uses libcurl with cookies enabled; handle is duplicated via curl_easy_duphandle; cloned handle does not set a cookie file; file named 'none' exists and is readable

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

libcurl is a library that programs use to download things from the internet. When a program copies a 'handle' (a connection object) that has cookies enabled, the copy mistakenly looks for a file called 'none' to load cookies from. If an attacker can place a file named 'none' in the program's working directory, they can control the cookies the program uses.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More by w0x42

View all

3 more disclosed reports, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.