Http request splitting
Node.js did not reject certain unusual whitespace and line-break characters in a URL passed to its HTTP client, so a crafted URL could be split into two separate requests.
- Triaged in 41 hours
- Fixed in 2 months
- Disclosed after 16 months
Hi,
I came upon the following tweet today: https://twitter.com/YShahinzadeh/status/1039396394195451904
which details a http request splitting vulnerability in NodeJS. You can confirm it with the following repro script:
const http = require('http')
const server = http.createServer((req, res) => {
console.log(req.url);
res.end();
});
server.listen(8000, function() {
http.get('http://127.0.0.1:8000/?param=x\u{0120}HTTP/1.1\u{010D}\u{010A}Host:{\u0120}127.0.0.1:8000\u{010D}\u{010A}\u{010D}\u{010A}GET\u{0120}/private', function() {
});
});
The vulnerability seems to be fixed in v10.0.0 but still present in v8.12.0. I also couldn't find a CVE for it or any information in the NodeJS changelog about it, so I'm not sure if the NodeJS community is aware of the issue.
Should this bug get a CVE assigned / have the fix backported to Carbon?
Thanks, Arkadiy
Impact
Http request splitting
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 the HTTP client did not reject or normalise unusual Unicode whitespace and line-break characters in the request path, allowing them to act as real line breaks in the outgoing request.
What the attacker needed
Node.js v8.12.0 (shown as affected)
The fix
The text says the issue appears fixed in v10.0.0 but asks whether the fix should be backported to the older release line; it does not describe the fix itself.
How it was found
- Run a small Node.js HTTP server that logs the requested URL.
- Use the Node.js HTTP client to request a URL containing the unusual whitespace and line-break characters.
- Observe that the request is split into two separate requests.
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.
This report shows that Node.js accepted a web address containing unusual whitespace and line-break characters, so the request message could be split into two separate requests.
What is Smuggling / CRLF?
A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.