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•6mo ago

Comments

blueflow•6mo 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•6mo 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•6mo ago
Imagine running

  curl --proxy-header "X-Test: $UNTRUSTED_USER_INPUT"
wang_li•6mo ago
That is not a bug in curl, at most it's a bug in whatever gathered $UNTRUSTED_USER_INPUT.
flotzam•6mo 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•6mo ago
Then the people assuming random things without doing research are to blame, not curl.
flotzam•6mo ago
Apportioning blame doesn't get rid of bugs; misuse resistant APIs do.
blueflow•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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•6mo 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.

A tiny entropy experiment to push LLMs into unexpected paths

1•seedwtfff•1m ago•0 comments

Truecaller Empowers "The CTO of the Family"

https://techcrunch.com/2025/12/09/truecaller-now-lets-users-protect-households-from-scam-calls/
1•cece2011•2m ago•1 comments

Spec-driven development: Unpacking one key new AI-assisted engineering practices

https://www.thoughtworks.com/en-us/insights/blog/agile-engineering-practices/spec-driven-developm...
1•zeld4•5m ago•0 comments

A European plan to escape American technology

https://ecfr.eu/publication/get-over-your-x-a-european-plan-to-escape-american-technology/
1•padjo•6m ago•1 comments

BazelCon 2025 Recap

https://blog.bazel.build/2025/12/08/bazelcon-recap.html
1•mesto1•12m ago•0 comments

BJH OS – A Free Open-Source Web Based Operating System (Demo and Source Code)

https://github.com/Haris16-code/BJH-OS
1•Haris18•16m ago•0 comments

Microsoft Invests $17.5B in India for AI

https://news.microsoft.com/source/asia/2025/12/09/microsoft-invests-us17-5-billion-in-india-to-dr...
1•MonkeyClub•19m ago•0 comments

If NFS isn't the answer for an all-Linux setup, what is?

https://old.reddit.com/r/homelab/comments/1mgfd9o/if_nfs_isnt_the_answer_for_an_alllinux_setup_what/
1•sipofwater•21m ago•0 comments

What Is Atlassian Intelligence?

https://www.getint.io/blog/what-is-atlassian-intelligence
1•renata_getint•22m ago•0 comments

MASTCHAIN's "Spotify Moment" Captures the AIs Summit, Wins Best New Startup 2025

https://mastchain.io/blog/mastchain-s-spotify-moment-captures-the-ais-summit-earning-best-new-sta...
2•WorldwideAIS•24m ago•0 comments

Trust as Infrastructure – Bryan Cantrill – Monktoberfest 2025 [video]

https://www.youtube.com/watch?v=WF7J7qtZ8TA
2•panick21_•25m ago•0 comments

Show HN: I built an app idea generator

https://whattobuildnext.com/
2•jelmervnuss•25m ago•0 comments

Getting into Public Speaking

https://james.brooks.page/blog/getting-into-public-speaking
1•jbrooksuk•28m ago•0 comments

More on the messy economics of streaming music

https://birchtree.me/blog/more-on-the-messy-economics-of-streaming-music/
1•wrxd•29m ago•0 comments

The Z3 Theorem Prover

https://github.com/Z3Prover/z3
5•benoitg•31m ago•0 comments

Jolla: The European Phone Makes Its Comeback

https://jolla.com/content/uploads/2025/12/Jolla_Phone_Press_Release_8-12-2025_FINAL_EN.pdf?x26973
3•qalter•32m ago•0 comments

Episodic Memory Architectures for Accurate and Efficient Character AI

https://arxiv.org/abs/2511.10652
2•PaulHoule•32m ago•0 comments

Synthetic chemicals in food system creating health burden of $2.2T a year

https://www.theguardian.com/environment/2025/dec/10/synthetic-chemicals-food-system-health-burden...
2•PJones2000•33m ago•0 comments

Ask HN: Is it still worth learning a new programming language?

3•xparadigm•33m ago•3 comments

Deploying Apache Doris with MinIO

https://www.velodb.io/blog/deploying-apache-doris-with-minio
1•qinchencq•33m ago•0 comments

AI Cloud OS Development

https://docs.google.com/document/d/e/2PACX-1vSfaXDM-4wIOiNVteBiIH3iwLxK9WeQ5HI2iFqY9nV-kbPP-wBNBs...
1•dlillard•36m ago•0 comments

The Rockstar Workers Fired Before They Could Finish GTA6 [video]

https://www.youtube.com/watch?v=c9nOwjeznjI
2•accengaged•41m ago•0 comments

Harvard Classics

https://en.wikipedia.org/wiki/Harvard_Classics
1•tosh•41m ago•0 comments

$475M seed round for Unconventional AI

https://a16z.com/announcement/investing-in-unconventional/
1•victorbuilds•41m ago•0 comments

SIM cards are a marvel of software engineering

https://nelkinda.com/blog/the-marvel-of-sim-cards/
1•ForHackernews•41m ago•0 comments

How std:move works in C++

https://0xghost.dev/blog/std-move-deep-dive/
1•0xghost•46m ago•1 comments

Angst in Cambridge UK after Arm 'hijacks' festive event

https://www.dailymail.co.uk/news/article-15367291/Children-left-tears-turned-away-Christmas-fair....
1•fork-bomber•47m ago•0 comments

Tai's model for the determination of total area under metabolic curves [pdf]

https://kconrad.math.uconn.edu/math1132s20/handouts/taipaper.pdf
1•ColinWright•48m ago•0 comments

How does Windows synthesize CF_Unicode­TEXT from CF_TEXT and vice versa?

https://devblogs.microsoft.com/oldnewthing/20251209-00/?p=111854
2•ibobev•49m ago•0 comments

A bestiary of mathematical functions for systems designers

https://brunodias.dev/2021/03/19/functions-for-system-designers.html
2•fanf2•50m ago•0 comments