Skip to content

fix(sensitive): Caddy refuses compressed request bodies to Actual (#970) - #1343

Merged
Gerrrt merged 2 commits into
mainfrom
gerrrt/actual-refuse-encoded-bodies
Nov 9, 2026
Merged

Gerrrt merged 2 commits into
mainfrom
gerrrt/actual-refuse-encoded-bodies

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 9, 2026

Copy link
Copy Markdown
Owner

What changed

Caddy's actual.matrix.elysium block now answers 415 to any request that carries a Content-Encoding header. Every other request goes to Actual as before. The sensitive README's Actual section and the changelog say why, and when the rule comes out.

Why

Refs #970. Actual 26.11.0 ships body-parser 2.3.0 (CVE-2026-111181). Actual mounts express.json/express.raw globally, before every router and before login, with default inflate, and registers no uncaughtException handler. So one compressed body with trailing bytes, from any device on Hicks, crashes the server. This was read from the bundle in the running container, not tested. The advisory's workaround is inflate: false, which Actual doesn't expose as a setting, so this rule does the same job at the proxy. Upstream master already has body-parser 2.4.0, but v26.11.0 was cut before it. Trace: #970 (comment)

The rule comes out in the 26.12.0 Dependabot bump, and #970 closes itself on the clean scan that follows.

Blast radius

Only trinity's sensitive Caddy, and only the Actual site. If the rule were wrong, Actual clients that compress request bodies would get 415 on sync and login. Actual's web client (@actual-app/web in the pinned image) never sets Content-Encoding on a request; it reads that header only on responses. I haven't checked Actual's mobile apps.

  • No change to network segmentation or firewall rules
  • No new port published to a VLAN that could not already reach the service
  • No credential added outside secrets/*.sops.yaml

Verification

  • scripts/check_caddyfile.sh: sensitive: Caddyfile adapts and provisions / is formatted, against the pinned caddy:2.11.7.

  • The same matcher in the pinned Caddy (--network none, POST to /account/login): no header → 200; Content-Encoding: gzip, identity and lowercase content-encoding: br → 415.

  • make validate: all checks passed, with 10 skipped (yamllint, ruff ×2 and ansible-lint aren't installed here; /tmp is a tmpfs for backup-offsite 2b; five host-only unit/timer checks). check_docs.py OK; lint.sh passed with 4 skipped.

  • make validate passes (with the skips above)

  • Deployed to the lab and confirmed working: after merge, make up STACK=sensitive on trinity, then check that a request with Content-Encoding gets 415 and the web app still syncs

  • Docs updated (stacks/sensitive/README.md, docs/changelog.md)

🤖 Generated with Claude Code

Actual 26.11.0 ships body-parser 2.3.0 (CVE-2026-111181). Actual parses
every request body before routing and login, with inflation on and no
uncaughtException handler, so one compressed body with trailing bytes from
anyone on Hicks crashes the server. actual.matrix.elysium now answers 415
to any request that carries Content-Encoding. Actual's web client never
sends one. The rule comes out in the 26.12.0 bump, which carries upstream's
body-parser 2.4.0.

Refs #970

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 9, 2026 21:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the temporary safeguard that rejects encoded requests to Actual.

No open issues 🎉

What changed in this PR

Adds a temporary Caddy safeguard for Actual against the body-parser vulnerability tracked in #970, without changing routing for requests that lack Content-Encoding.

Changes:

  • Returns HTTP 415 for requests with any Content-Encoding header on actual.matrix.elysium.
  • Documents the vulnerability, mitigation, and planned removal after an image update resolves it.
File Description
stacks/​sensitive/​README.md Documents the request restriction and removal condition.
stacks/​sensitive/​Caddyfile Rejects encoded requests before proxying to Actual.
docs/​changelog.md Records the temporary mitigation and planned removal.

Review effort: Balanced

…encoded-bodies

# Conflicts:
#	docs/changelog.md
@Gerrrt
Gerrrt merged commit 7f62479 into main Nov 9, 2026
8 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/actual-refuse-encoded-bodies branch November 9, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants