Repository navigation
fix(sensitive): Caddy refuses compressed request bodies to Actual (#970) - #1343
Merged
Merged
Conversation
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>
There was a problem hiding this comment.
🟢 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-Encodingheader onactual.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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Caddy's
actual.matrix.elysiumblock now answers 415 to any request that carries aContent-Encodingheader. 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.rawglobally, before every router and before login, with defaultinflate, and registers nouncaughtExceptionhandler. 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 isinflate: false, which Actual doesn't expose as a setting, so this rule does the same job at the proxy. Upstreammasteralready 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/webin the pinned image) never setsContent-Encodingon a request; it reads that header only on responses. I haven't checked Actual's mobile apps.secrets/*.sops.yamlVerification
scripts/check_caddyfile.sh:sensitive: Caddyfile adapts and provisions/is formatted, against the pinnedcaddy:2.11.7.The same matcher in the pinned Caddy (
--network none, POST to/account/login): no header → 200;Content-Encoding: gzip,identityand lowercasecontent-encoding: br→ 415.make validate: all checks passed, with 10 skipped (yamllint, ruff ×2 and ansible-lint aren't installed here;/tmpis a tmpfs for backup-offsite 2b; five host-only unit/timer checks).check_docs.pyOK;lint.shpassed with 4 skipped.make validatepasses (with the skips above)Deployed to the lab and confirmed working: after merge,
make up STACK=sensitiveon trinity, then check that a request withContent-Encodinggets 415 and the web app still syncsDocs updated (
stacks/sensitive/README.md,docs/changelog.md)🤖 Generated with Claude Code