v5.0.0 4.2.1 cites RFC 2616, which is obsolete; RFC 9112 section 6.3 words the rule differently
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 85/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- markdown
- Domain
- documentation
Research direction
Open 5.0/en/0x13-V4-API-and-Web-Service.md at line 29 and read requirement 4.2.1 in the table. Rewrite the HTTP/1.x sentence so it cites RFC 9112 section 6.3 instead of RFC 2616 and covers the precedence of Transfer-Encoding, the connection close, and the intermediary removing Content-Length. Search the file (and neighbouring 5.0/en/ chapters) for other RFC 2616 citations while you are there. Done when the row reads correctly against RFC 9112 and no stale reference remains in that file.
Written by the indexing model from the issue text.
Description
Requirement 4.2.1 in 5.0/en/0x13-V4-API-and-Web-Service.md (line 29, at 6e40a85) reads:
| # | Description | Level |
|---|---|---|
| 4.2.1 | Verify that all application components (including load balancers, firewalls, and application servers) determine boundaries of incoming HTTP messages using the appropriate mechanism for the HTTP version to prevent HTTP request smuggling. In HTTP/1.x, if a Transfer-Encoding header field is present, the Content-Length header must be ignored per RFC 2616. When using HTTP/2 or HTTP/3, if a Content-Length header field is present, the receiver must ensure that it is consistent with the length of the DATA frames. | 2 |
Two points, both checked against the RFC Editor:
- RFC 2616 is obsolete. The RFC index lists it as obsoleted by RFC 7230 to 7235, and RFC 7230 as obsoleted by RFC 9110 and RFC 9112 (June 2022, STD 99). Message framing for HTTP/1.1 now lives in RFC 9112 section 6.
- The rule is worded differently there. RFC 9112 section 6.3, item 3: "If a message is received with both a Transfer-Encoding and a Content-Length header field, the Transfer-Encoding overrides the Content-Length. Such a message might indicate an attempt to perform request smuggling (Section 11.2) or response splitting (Section 11.1) and ought to be handled as an error. An intermediary that chooses to forward the message MUST first remove the received Content-Length field and process the Transfer-Encoding ... prior to forwarding the message downstream." Section 6.1 adds that a server MAY reject such a request or process it using Transfer-Encoding alone, and "Regardless, the server MUST close the connection after responding to such a request".
So "Content-Length must be ignored" is the RFC 2616 phrasing (section 4.4). It is not wrong in effect, but it omits the part that matters for smuggling: the message is suspect and the connection must not be reused.
Possible rewording of the HTTP/1.x sentence, if the maintainers want to change it: "In HTTP/1.x, if both Transfer-Encoding and Content-Length are present, Transfer-Encoding takes precedence (RFC 9112 section 6.3), the message is treated as an error or the connection is closed after the response, and an intermediary removes Content-Length before forwarding."
I have not opened a PR, per CONTRIBUTING.md. Happy to prepare one if you agree on the wording.
Sources: https://www.rfc-editor.org/rfc/rfc9112.html#section-6.3 and https://www.rfc-editor.org/rfc/rfc9112.html#section-6.1
Tausif Ahmed, Founder & CEO, Purplecop Security
- Dominant language
- HTML
- Stars
- 3.9k
- Forks
- 865
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 19
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OWASP/ASVS
-
Crypto appendix: fix title "Post-Quantum Encryption Standards"May be free again A pull request for this issue was closed without being merged. OpenAppendix C
Difficulty 1/5 Under an hour Newbie friendliness 85/100
OWASP/ASVS#3468 · 3 comments ·
Maintainers usually reply within 1 day
-
Crypto appendix: fix notations wrt RSAPossibly taken @randomstuff claimed this 1 day ago. Open1) Discussion ongoing Appendix C V11 (prev V6)
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
OWASP/ASVS#3467 · 4 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
V6 (prev V2)
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
OWASP/ASVS#3433 · 4 comments ·
Maintainers usually reply within 1 day
-
Update proposal for v5.0.0-3.3.1 and v5.0.0-3.3.3 to cover __Host-Http- and __Http- cookie name prefixesMay be free again A pull request for this issue was closed without being merged. Open1) Discussion ongoing V3 (prev V50)
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OWASP/ASVS#3429 · 7 comments ·
Maintainers usually reply within 1 day
-
Images and references pointing to old project page that does not exist anymorePossibly taken @atg06 claimed this 3 days ago. Open5) awaiting PR
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
OWASP/ASVS#3424 · 5 comments · 2 assignees ·
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
lem-project/lem#2525 ·
Maintainers usually reply within 1 day
-
infra
Difficulty 1/5 Under an hour Newbie friendliness 94/100
Maintainers usually reply within 1 day
-
Add Strange QuarkOpen
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
facebookresearch/atlas-lean#20426 ·
Maintainers usually reply within 1 day
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day