Repository navigation
fix(edge): build Caddy with go-jose v4.1.6 (CVE-2026-116587) - #41
Closed
knittingcode wants to merge 4 commits into
Closed
knittingcode wants to merge 4 commits into
knittingcode wants to merge 4 commits into
Conversation
go-jose v4.1.5 in the rebuilt Caddy binary is affected by CVE-2026-116587 (GHSA-mgcc-cww5-fp2q, DoS when parsing JWKs with RSA keys); 4.1.6 fixes it. go.mod and go.sum updated with go get and go mod tidy; go mod verify is clean.
Record that the go-jose v4 path is fixed and that go-jose v3 3.0.5 stays: it is linked through caddypki, which caddytls, httpcaddyfile and therefore caddyhttp import, so no Caddy module selection removes it. State why FlowCRM's configuration does not reach the code and that the finding still fails the edge prod gate.
…m the Caddy triage
Owner
Author
|
Superseded by #42 (squash commit 1badf76). Verified against main 1badf76: docker/edge/caddy/go.mod and go.sum are byte-identical to this PR's head cf9dc3e (go-jose/v4 4.1.6). The CVE-2026-116587 section of docs/security/container-vulnerabilities.md is in main, extended by #42. The only sentence of this PR not kept is the one saying the finding fails the gate until an exception is decided; ADR-021, accepted on 2026-10-28, replaced it. Closed without merging; the branch is kept. |
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.
Summary
Builds the edge's Caddy binary with
github.com/go-jose/go-jose/v44.1.6, which fixes CVE-2026-116587 / GHSA-mgcc-cww5-fp2q (HIGH) for v4. The docs record the triage of the part that can't be fixed yet:go-jose/v33.0.5, for which no fixed release exists.This PR alone does not make the edge-prod Trivy gate pass. The v3 finding remains, and the gate correctly keeps failing on it. Resolving v3 needs an owner decision; see "Known limitations".
Motivation
crypto/rsavalidation, so a crafted key costs cubic CPU (denial of service, CWE-407/770).last_affected: 3.0.5).999d4d1's run 40669720894 stopped earlier, at BE-03, and never reached Trivy; the same binary is on main.Implementation
docker/edge/caddy/go.modandgo.sum:go get github.com/go-jose/go-jose/v4@v4.1.6andgo mod tidy.go mod verifyis clean.-mod=readonly.docs/security/container-vulnerabilities.md: a new section covering:main.go, the Caddyfiles, the scanner, its thresholds orsecurity/trivyignore.yaml. No exception is added.Why not a Caddy build without
caddypkimodules/caddytls(internal issuer, CA pools) andcaddyconfig/httpcaddyfileimportcaddypkidirectly, andmodules/caddyhttpimportscaddytls.caddypki→smallstep/certificates/authority→go.step.sm/crypto/jose→ go-jose/v3.modules/standardlist withoutcaddypkiandacmeserverstill contains v3 3.0.5 (go version -m). It drops onlyhttp.handlers.acme_server.go.step.sm/crypto0.91.1 (the newest) still requires v3, and Caddy 2.11.7 andsmallstep/certificates0.30.2 are the newest releases.Testing
Scans with the repo's pinned Trivy 0.67.2, using the same flags and template as
tests/app/scan.sh:No OS-package findings in any of them.
Config validation:
caddy validatepasses onCaddyfile.dev,Caddyfile.prodandtests/app/https/Caddyfile.caddy adaptgives identical JSON from main and from this branch.Container smoke tests: this branch behaves the same as main for:
common.caddyheaders and request IDs;/apiand the health paths;tests/app/prodlike.sh: run in its own disposable Compose project, 39 passed, 0 failed, including the TLS and browser-over-TLS checks PL-17 to PL-23.Repository guards: all three in
scripts/ciexit 0.Reachability, checked with the binary built exactly as the Dockerfile does:
acme_serverspent about 2.2 s of CPU on one unauthenticated request.Regression protection: the existing Trivy gate. Main's v4 4.1.5 fails it, so a downgrade would fail again.
CI on this head: run 40682119210 on
3f2e70bfailed only at BE-03 (the PHPUnit advisory, fixed by #40). Guards 36/73/46, allocator 288/140, PHPUnit 156/278 and 53/53 negative controls passed. Frontend, stack, prod-like and Trivy were skipped after that failure, so CI has not yet shown v4 gone from the scan; the evidence above comes from local scans with the pinned Trivy. After #40 is on main, this branch needs a sync, and its CI should then fail only on the v3 finding.Later commits:
2266471andcf9dc3eare documentation only: the scan run IDs, a link from the older Caddy triage, and rewrapping. Run 40683504738 on the current headcf9dc3egives the same result: it fails only at BE-03, and the later steps are skipped. Run 40683466078 on2266471was cancelled when the newer push superseded it.Security considerations
acme_serverhandler passes untrusted JWS/JWK data to go-jose;tls internaland thepkiapp parse only keys Caddy creates or loads from its own configuration.acme_server,pki,tls internal,local_certsor issuer, andadmin off,auto_https off,persist_config off.Known limitations
golang.org/x/net0.60.0 (GO-2026-6866, GO-2026-6860; fixed in 0.62.0). It is imported but not called, and Trivy doesn't flag it HIGH/CRITICAL.