GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fleet-proxy(broker): method/path CRLF injection — one frame smuggles a second request onto the pooled tunnel · Issue #5750 · developing-today/code

fleet-proxy(broker): method/path CRLF injection — one frame smuggles a second request onto the pooled tunnel #5750

New issue
Copy link
New issue
Copy link
Closed
#5752
Closed
fleet-proxy(broker): method/path CRLF injection — one frame smuggles a second request onto the pooled tunnel#5750
#5752
Copy link
Labels
app/fleetpkgs/fleet multicall binary + platform crateskind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Nov 5, 2026
Issue body actions

fleet-proxy(broker): request method/path are interpolated into the HTTP request line with no validation — CRLF injection and request smuggling onto the pooled tunnel

Evidence (verified this run, laptop primary @ a719a69)

The broker turns a client frame into an HTTP request to a laptop service in two steps, and neither validates the two caller-controlled strings:

  1. pkgs/fleet/crates/fleet-proxy/src/serve.rs:415 parse_request — method and path are required only to be JSON strings; any content is accepted and passed on.
  2. pkgs/fleet/crates/fleet-proxy/src/serve.rs:312 do_request hands them straight to HttpConn::request, and pkgs/fleet/crates/fleet-proxy/src/http.rs:132 builds the head by interpolation:
let mut head = format!(
    "{method} {path} HTTP/1.1\r\n\
     Host: {host_header}\r\n\
     X-Agent-Token: {token}\r\n\
     ...

There is no control-character, whitespace, or token check anywhere in the chain (both files read in full this run). The Python broker this succeeds got the validation for free from http.client, which rejects control characters in the URL and non-token methods; the Rust port dropped it.

Behavioral probe (laptop probe crate ~/git/fleet/probe-crlf, path-dep on the real fleet-proxy, HttpConn::request against a recording loopback service):

  • Control GET /health → the service received exactly one well-formed request head.
  • Crafted path /health\r\nX-Injected: yes\r\nContent-Length: 0\r\n\r\nGET /admin HTTP/1.1\r\nHost: x\r\nX-Agent-Token: forged\r\n\r\n → the service received the injected X-Injected: yes header, a Content-Length: 0 that terminates the first request early, and then a complete second, smuggled request (GET /admin with a forged X-Agent-Token header) ahead of the broker's own head — on the connection the pool will reuse for the next client.
  • Crafted method GET\r\nX-Method-Injected: 1 → the service received GET\r\nX-Method-Injected: 1 /health HTTP/1.1… — header injection through the method as well.

Why it matters

The broker is the fleet's confused-deputy boundary: it reads the agent token from disk and attaches it to whatever a socket client asks for, over pooled keep-alive tunnels. One frame is supposed to be exactly one request. With CRLF in method/path a frame becomes two requests: the second one's response is read as the next broker client's response (cross-client response confusion on the pool), injected headers land ahead of the broker's own (a service reading the first X-Agent-Token sees the forged one), and a forged Content-Length desyncs the pooled stream — the exact failure family #5579 hardened the response reader against, left open on the request side. Same class as #2404 (newline in a header field forges arbitrary headers), which this repo treats as a bug worth fixing.

Acceptance criteria

  • The broker rejects a frame whose method is not a valid HTTP token, or whose path is empty or contains a control character, space, or DEL — with the usual {status: 502, body: {error}} response and no bytes written to any tunnel (no pool checkout consumed by the smuggled request).
  • Defense in depth at the second layer: HttpConn::request itself returns HttpError::Malformed for an invalid method/path before writing anything, so no present or future caller can smuggle through it.
  • Legitimate traffic is unchanged: ordinary methods (GET/POST/…) and paths (including query strings and percent-encoded bytes) pass byte-for-byte as today.
  • New pinning tests cover: CRLF in path, CRLF in method, space in path, empty path, and a well-formed control — at whichever layer(s) the fix lands.
  • cargo test -p fleet-proxy --all-features green on the laptop.

Activity

  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    status/in-progressQueue worker lifecycle state
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    developing-todayBot
    on Nov 5, 2026 – with developing.today
    Contributor
    More actions

    CODE-1439

  3. dezren39
    added
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    work/self-assignedAn agent grabbed this item directly, outside the queue
    app/fleetpkgs/fleet multicall binary + platform crates
    on Nov 5, 2026
  4. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator-code-a (creator lane A)
    • Session / ID: new-issue-creator-code-a run 2026-11-04 19:05 CST
    • Found via: filed this run
    • Task: Validate the broker's request method/path before they reach the HTTP request line — reject a non-token method and a path with control characters/space/DEL at parse_request (502, no tunnel bytes) and defensively in HttpConn::request (HttpError::Malformed before any write). Verified pre-filing with a laptop probe crate (~/git/fleet/probe-crlf, path-dep on the real fleet-proxy @ a719a69): a crafted path made the recording service receive an injected header, a Content-Length: 0, and a complete smuggled GET /admin request with a forged X-Agent-Token; a crafted method injected a header too; the plain-path control was clean.
    • Expectation: effort xs; done = fix merged, cargo test -p fleet-proxy --all-features green on the laptop, probe re-run against the fixed crate (crafted cases rejected, control unchanged). Guarded self-solve this run (trivial, small, low-risk — the fleet-proxy(http): response reader trusts peer-declared sizes (unbounded preallocation) and silently drops the body on a malformed Content-Length, desyncing the pooled connection #5579/id(directory_mail): OutboxSink writes To/Subject into the .eml header block with none of SmtpSink's validation — a newline in either forges arbitrary headers #2404 bug class).
    • Links: body evidence in the issue; probe at ~/git/fleet/probe-crlf on the laptop.
  5. developing-today
    added
    status:in-review
    on Nov 5, 2026
  6. dezren39
    added a commit that references this issue on Nov 5, 2026

    fleet-proxy: validate method/path before they reach the request line (#…

    c2bf5fc
  7. dezren39
    closed this as completedin #5752on Nov 5, 2026
  8. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 5, 2026
  9. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: new-issue-creator-code-a (creator lane A)
    • Session / ID: new-issue-creator-code-a run 2026-11-04 19:05 CST
    • Found via: filed this run
    • Task: DONE — PR fleet-proxy: validate method/path before they reach the request line (#5750) #5752 squash-merged (c2bf5fc): HttpConn::request now validates the method (RFC 9110 token) and path (origin-form, no space/control/DEL) and returns HttpError::Malformed before writing a byte; parse_request rejects the same shapes at the frame boundary with the usual 502, before any pool checkout. 3 new pinning tests; cargo test -p fleet-proxy --all-features green on the laptop (26 passed), fmt applied. Fixed crate re-probed with ~/git/fleet/probe-crlf-fixed: both crafted cases (CRLF path with a smuggled GET /admin, CRLF method) return Malformed and the recording service receives zero bytes; the plain-path control is byte-identical to before.
    • Expectation: closed — issue auto-closed by the merge; work labels stripped.
    • Links: PR fleet-proxy: validate method/path before they reach the request line (#5750) #5752; pre-fix probe evidence in the issue body (~/git/fleet/probe-crlf on the laptop).
  10. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    work/self-assignedAn agent grabbed this item directly, outside the queue
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/fleetpkgs/fleet multicall binary + platform crateskind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.