---
title: "Post Mortem: HTTP Request Smuggling Vulnerability"
description: "Crystal's HTTP::Server request parser preferred Content-Length over Transfer-Encoding because an elsif chain never evaluated the chunked branch when Content-Length was present."
url: "https://swe.quest/articles/post-mortem-http-request-smuggling-vulnerability-389a0ad976607a71"
canonical: "https://crystal-lang.org/2026/05/26/http-request-smuggling-vulnerability-in-http-server/"
source: "Crystal Blog"
published: "2026-05-26"
difficulty: "medium"
kind: "Incident"
reading_minutes: 3
tags: ["appsec","vulnerability-research","networking","incident-response"]
---

# Post Mortem: HTTP Request Smuggling Vulnerability

A post on [Crystal Blog](https://swe.quest/sources/crystal.md), published 2026-05-26, 3 min read, Incident. Original: [https://crystal-lang.org/2026/05/26/http-request-smuggling-vulnerability-in-http-server/](https://crystal-lang.org/2026/05/26/http-request-smuggling-vulnerability-in-http-server/)

## Summary

Crystal's HTTP::Server request parser preferred Content-Length over Transfer-Encoding because an elsif chain never evaluated the chunked branch when Content-Length was present. That enabled CL.TE request smuggling when a TE-preferring reverse proxy sits in front, potentially bypassing proxy-enforced auth or rate limits. The fix follows RFC 9112 Section 6.1: requests carrying both headers are rejected and Transfer-Encoding is checked first. It shipped in Crystal 1.20.0 and 1.19.2. The team rated the risk low because exploitation needs a non-compliant proxy.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Application security](https://swe.quest/tags/appsec.md) (Security)
- [Vulnerability research](https://swe.quest/tags/vulnerability-research.md) (Security)
- [Networking](https://swe.quest/tags/networking.md) (Infrastructure)
- [Incidents & postmortems](https://swe.quest/tags/incident-response.md) (Reliability & operations)

## Prerequisites

- HTTP/1.1 message framing
- reverse proxies ([easy posts on Load balancing](https://swe.quest/tags/load-balancing.md?difficulty=easy))

## Keywords

Crystal, HTTP::Server, HTTP request smuggling, RFC 9112, Transfer-Encoding, Content-Length, GHSA-wqh5-7w63-pm68

## Related posts

- [Crystal 1.22.3 is released!](https://swe.quest/articles/crystal-1-22-3-is-released-eaa59fe6cd70a78c.md): Crystal Blog · 2026-11-13 · Medium · 2 min read · Application security, Networking, Memory safety
  Crystal 1.22.3 is a patch release of 14 changes from 4 contributors, focused on security fixes and regressions.
- [How to avoid bad assumptions during incidents](https://swe.quest/articles/how-to-avoid-bad-assumptions-during-incidents-b173051fa360fe61.md): incident.io · 2021-09-24 · Medium · 7 min read · Incidents & postmortems, Debugging, Load balancing, Networking
  HTTP header names arriving downcased at a public API were wrongly blamed on a Google Cloud Load Balancer change.
- [Crystal 1.20.3 is released!](https://swe.quest/articles/crystal-1-20-3-is-released-5f57668e9ca1dec8.md): Crystal Blog · 2026-07-02 · Easy · 1 min read · Application security, Security
  Crystal 1.20.3 fixes two security vulnerabilities in the YAML parsers.
- [How Cloudflare WAF protects against ruby2shell (CVE-2026-132825)](https://swe.quest/articles/how-cloudflare-waf-protects-against-ruby2shell-cve-2026-132825-7727483822350470.md): Cloudflare · 2026-11-20 · Medium · 6 min read · Vulnerability research, Ruby, Application security, Memory safety
  ruby2shell (CVE-2026-132825) is a heap buffer overflow in Ruby's string case conversion: in 14 legacy single-byte encodings, uppercasing the German ß writes two bytes (SS) but reserves room for one, so 21 sharp s characters overflow by a byte, with proofs of concept reaching remote code execution.
- [Protecting user data through source code analysis at scale](https://swe.quest/articles/protecting-user-data-through-source-code-analysis-at-scale-357585a0d96f83c8.md): Meta Engineering · 2025-02-18 · Medium · 4 min read · Static analysis, Threat detection, Application security, Python
  Meta's Anti-Scraping team encodes known scraping attack vectors as taint-analysis rules in its in-house static analyzers, Zoncolan for Hack and Pysa for Python, so potential vectors are flagged before code ships.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
