frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

CRLF Injection in `–proxy-header` allows extra HTTP headers (CWE-93)

https://hackerone.com/reports/3133379
11•oblivionsage•10mo ago

Comments

blueflow•10mo ago
Check the man-page first. You need to know how a program is supposed to behave before you can know that an observed behavior is off-spec and warrants a bug.
robertlagrant•10mo ago
I don't understand the "This is not supposed to happen". Can someone explain?

To me this is the same as

  --proxy-header "X-Test: hello" --proxy-header "X-Evil: owned"
flotzam•10mo ago
Imagine running

  curl --proxy-header "X-Test: $UNTRUSTED_USER_INPUT"
wang_li•10mo ago
That is not a bug in curl, at most it's a bug in whatever gathered $UNTRUSTED_USER_INPUT.
flotzam•10mo ago
People still expect an API to reject illegal values. Calling the parameter --proxy-header (singular) could lead someone to assume that multiline strings are illegal values, even if there's a note in the docs somewhere saying otherwise.
blueflow•10mo ago
Then the people assuming random things without doing research are to blame, not curl.
flotzam•10mo ago
Apportioning blame doesn't get rid of bugs; misuse resistant APIs do.
blueflow•10mo ago
Reading docs ("research") is essential part of engineering.

Lets ask the question reversed: How did people know in the first place what kind of string they need to give to --proxy-header?

flotzam•10mo ago
> Reading docs ("research") is essential part of engineering.

Sure, but so is safety engineering. Making mechanisms more obvious to use correctly or fail safe if used incorrectly improves outcomes when flawed human beings use them. It also makes them more pleasant to use in general.

Besides, look at the man page in question. It's talking about this in terms of encoding niceties and doesn't even spell out the possibility of deliberate, let alone malicious multiline values:

"curl makes sure that each header you add/replace is sent with the proper end-of-line marker, you should thus not add that as a part of the header content: do not add newlines or carriage returns, they only mess things up for you."

That's inducing a wrong/incomplete mental model of how this parameter works.

blueflow•10mo ago
> doesn't even spell out the possibility of deliberate, ... multiline values

It does for me, as any kind of extra newlines results in a multi-line string.

> ... malicious ...

Like Daniel said, garbage in, garbage out. If you pass user inputs to curl, one should check what curl does with these values and take proper care.

robertlagrant•10mo ago
> do not add newlines or carriage returns, they only mess things up for you

I disagree, but I would say that curl might as well add this as a validation check than a documentation warning.

blueflow•10mo ago
This is explained in the ticket:

  One of the reasons we still allow that is that this "feature" was used quite deliberately by users in the past and I have hesitated to change that for the risk that it will break some users use cases.
robertlagrant•10mo ago
Yes, I'm not sure if I agree with this or not. Those users don't have to upgrade. But obviously I'm not maintaining a key tool for the world. It's just my opinion.
soraminazuki•10mo ago
One shouldn't construct shell commands from untrusted user input in the first place unless they know exactly what they're doing and is aware of all the pitfalls. It's the worst possible tool to be using if the aim is to avoid security issues with minimal effort. Debating about this particular curl quirk distracts from the bigger issue IMO.
robertlagrant•10mo ago
> That is not a bug in curl, at most it's a bug in whatever gathered $UNTRUSTED_USER_INPUT.

But that could just contain the bad header only, could it not?

jeroenhd•10mo ago
I suppose it kind of depends. I agree with the curl team here that this is a case of garbage in/garbage out, but I can imagine this going wrong with a binary protocol like HTTP2 on the front and a text protocol like HTTP 1.1 behind a reverse proxy. The \r\n will make it to the proxy as a separate header, but will be turned into two headers on the upstream.

That said, this would be a (reverse) proxy vulnerability, not one in curl.

ale42•10mo ago
I'm not sure where is the security issue here. As already noted, one can just put several --proxy-header arguments, so the functionality is equivalent.

The only way this would do something unexpected (and not necessarily dangerous besides breaking the service) would be if the curl command would be used in a scenario like: (1) curl is used by some script to access some API or other URL, (2) a user can configure the script to give a specific value to an header, let's say an authentication token or similar, but the user can't directly alter the curl command (e.g. because they can only change URL and TOKEN with a web interface). Here the user would be able to add an header IF the script is not properly sanitizing the input (so the supposed security issue IMHO would be in the script), but if adding an additional header breaks security, the underlying system has a problem too...

In a very far-stretched scenario, one can possibly add two CRLFs and have the rest of the header (if any) considered by the server as data. IF the request is a POST/PUT/... request, and IF the server returns (or allows later access to) the data, and IF the attacker manipulating the supposedly-restricted single-header can see the output of the call (or retrieve the saved data), then we'd have an information disclosure issue. Would it disclose anything sensitive? Not sure, unless there's an auth token or something AFTER the header. And again, I'd rather incriminate the curl caller for not sanitizing the input if this happens.

Show HN: Homelabinator, the easiest way to self-host

https://homelabinator.com/
1•daniala•32s ago•0 comments

Right of Reply

https://en.wikipedia.org/wiki/Right_of_reply
1•joebig•2m ago•0 comments

Infrastructure Lead position at AI startup Intric

https://careers.intric.ai/jobs/7256033-first-infrastructure-lead-build-europe-s-secure-ai-platform
1•vicasp•3m ago•0 comments

The machine didn't take your craft. You gave it up.

https://www.davidabram.dev/musings/the-machine-didnt-take-your-craft/
1•thm•5m ago•0 comments

The latest world climate report is grim, but it's not the end of the story

https://theconversation.com/the-latest-world-climate-report-is-grim-but-its-not-the-end-of-the-st...
3•Anon84•7m ago•0 comments

State of the Global Climate 2025

https://wmo.int/publication-series/state-of-global-climate/state-of-global-climate-2025
2•Anon84•7m ago•0 comments

Fallingfruit.org – Public Land Foraging Map

https://fallingfruit.org/?locale=en
1•twotwoz•7m ago•0 comments

LLMs learn what programmers create, not how programmers work

2•noemit•9m ago•0 comments

Russian authorities block paywall removal site Archive.today

https://techcrunch.com/2026/03/23/russian-authorities-block-paywall-removal-site-archive-today/
2•jborichevskiy•9m ago•1 comments

The Immortalism Manifesto

https://immortalism.bryanjohnson.com/
1•Anon84•9m ago•0 comments

NOAA's National Weather Service eyes the cloud for next-gen applications

https://www.noaa.gov/news-release/noaas-national-weather-service-eyes-cloud-for-next-gen-applicat...
4•WalterSobchak•10m ago•0 comments

Show HN: I built an art management platform for visual artists

https://artworkcodex.com
1•contusion1782•11m ago•0 comments

Show HN: Burn Room – ephemeral SSH chat, messages burn after 1 hour

https://burnroom.chat
2•joematrix•12m ago•0 comments

Next-generation electricity is almost here

https://www.gatesnotes.com/work/accelerate-energy-innovation/reader/the-next-generation-of-electr...
2•jonbaer•13m ago•0 comments

How would you attack a local-first password manager?

https://apps.microsoft.com/detail/9p4r9gpcrvhb?hl=en-US&gl=US
1•merimens•14m ago•1 comments

Bets on US-Iran ceasefire show signs of insider knowledge, say experts

https://www.theguardian.com/us-news/2026/mar/23/bets-us-iran-ceasefire-show-signs-of-insider-know...
7•trocado•15m ago•0 comments

Parent sues over likely worthless 'bond' meant to prop up troubled school

https://www.universalhub.com/2026/croft-school-parent-sues-over-likely-worthless-croft-bond-meant...
2•ilamont•17m ago•1 comments

The Long-term decline of the US Job ladder (NBER)

https://www.nber.org/papers/w34981
2•imakwana•17m ago•0 comments

Any experience with the BrailleRap open source Braille embosser?

https://github.com/braillerap/BrailleRap
1•jareds•18m ago•1 comments

CrowdMind – Validate product ideas with AI personas before you build

https://github.com/yasintoy/crowdmind
1•yasintoy•20m ago•0 comments

Bezos wants AI to approve permits in 10 seconds. What 1.8M permits show

https://prevesta.io/blog/bezos-ai-building-permits
2•archiekane•21m ago•0 comments

Amazon is making a new smartphone more than a decade after its Fire Phone

https://sherwood.news/tech/amazon-is-making-a-new-smartphone-more-than-a-decade-after-its-fire-ph...
2•avonmach•22m ago•2 comments

Computers This Week

https://hesnotjoking.substack.com/p/computers-b0a
1•ucla_rob•22m ago•0 comments

Kamal, Rails deployments, and Rega turntables

https://marianposaceanu.com/articles/kamal-rails-deployments-and-rega-turntables
1•dakull•23m ago•0 comments

Tappie-py – A cross-platform Homebrew GUI for macOS and Linux, built with Python

https://www.empiricapps.com/tappie/download
1•mburlac•24m ago•0 comments

Semi-retirement, or, changing my relationship with the BSDs

https://briancallahan.net/blog/20260322.html
1•t-3•25m ago•0 comments

UN warns of record 'climate imbalance' as planetary warming accelerates

https://news.un.org/en/story/2026/03/1167178
4•geox•27m ago•0 comments

Veevo Health – book a CT angiogram to see plaque buildup in your arteries

2•arvindsr33•28m ago•0 comments

American Aviation Is Near Collapse

https://www.theatlantic.com/newsletters/2026/03/aviation-failures-tsa-dhs-shutdown/686505/
28•JumpCrisscross•29m ago•3 comments

Ask HN: Are you also getting more angry with Claude as you use it for longer?

2•kykat•29m ago•0 comments