Skip to content

fix(worker): accept the cosign x/text DoS until upstream rebuilds - #538

Merged
haksungjang merged 1 commit into
mainfrom
fix/worker-cosign-xtext-cve
Jul 28, 2026
Merged

fix(worker): accept the cosign x/text DoS until upstream rebuilds#538
haksungjang merged 1 commit into
mainfrom
fix/worker-cosign-xtext-cve

Conversation

@haksungjang

Copy link
Copy Markdown
Contributor

CVE-2026-56852 was published into Trivy's database and turned image-scan (worker) — a required check — red on every branch, including PRs that touch nothing near the image. First seen on #537, whose diff contains no Dockerfile and no dependency change.

Why not bump

The finding is golang.org/x/text v0.38.0 inside usr/local/bin/cosign. The fixed version is 0.39.0, and no cosign release is built against it:

$ curl -s https://raw.githubusercontent.com/sigstore/cosign/v3.1.2/go.mod | grep x/text
	golang.org/x/text v0.38.0 // indirect
$ curl -s https://raw.githubusercontent.com/sigstore/cosign/v3.1.1/go.mod | grep x/text
	golang.org/x/text v0.38.0 // indirect

v3.1.2 (2026-07-17) is the newest upstream release, so bumping COSIGN_VERSION moves the pin without clearing the finding. That is category 2 of the .trivyignore policy — patched upstream, not yet in a release of the vendored tool — the same situation as the grpc entry directly above it.

Reach

cosign sign-blob is invoked as a CLI, once per scan, over a blob the worker itself just wrote: the portal-generated CycloneDX SBOM (integrations/cosign.py). No untrusted text is normalised, and x/text is an indirect dependency of cosign that our invocation gives nothing to.

The vulnerability is a denial of service — norm.Iter spinning on malformed UTF-8 — with no disclosure and no execution. Even granting reachability, the blast radius is one subprocess: sign_blob runs under COSIGN_TIMEOUT_SECONDS (120s default, core/config.py), after which the signing step is skipped and recorded, so a hung cosign cannot eat the scan budget.

Expiry

The entry carries the check command and a re-evaluation date: the next cosign release built with x/text >= 0.39.0, or 2026-10-29, whichever is sooner. A rebuild drops the finding automatically once upstream ships one.

CVE-2026-56852 landed in Trivy's database and turned the required
image-scan gate red on every branch. It is a denial of service in
golang.org/x/text's `norm.Iter`, reached through the cosign binary the
worker image carries for SBOM signing.

There is nothing to bump to. The fix is x/text 0.39.0, and cosign v3.1.2 —
released 2026-07-17, the newest upstream build — still pins
`golang.org/x/text v0.38.0 // indirect`, as does the v3.1.1 we ship. That
is category 2 of the .trivyignore policy: patched upstream, not yet in a
release of the vendored tool.

The reach analysis is in the entry, and the short version is that the only
thing cosign parses here is a file the worker wrote seconds earlier. It runs
as a CLI, once per scan, over the portal's own CycloneDX SBOM; no untrusted
text is normalised, and x/text is an indirect dependency our invocation does
not feed. The DoS itself is bounded even if that reasoning is wrong:
`sign_blob` runs under COSIGN_TIMEOUT_SECONDS (120s by default), after which
signing is skipped and recorded, so a spinning subprocess cannot take the
scan budget with it.

Re-evaluate on the next cosign release built with x/text >= 0.39.0, or
2026-10-29, whichever comes first — the entry says how to check.
@haksungjang
haksungjang merged commit 24b5199 into main Jul 28, 2026
21 checks passed
@haksungjang
haksungjang deleted the fix/worker-cosign-xtext-cve branch July 28, 2026 21:59
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.

1 participant