{"id":"CVE-2026-22728","aliases":["CVE-2026-22728","GHSA-465p-v42x-3fmj","BIT-SEALED-SECRETS-2026-22728","GO-2026-4565"],"related":["CGA-4jv9-3xgw-ggfc"],"kind":"vulnerability","state":"published","title":"sealed-secrets /v1/rotate can widen sealing scope to cluster-wide via attacker-controlled template annotations","summary":"Bitnami Sealed Secrets is vulnerable to a scope-widening attack during\nthe secret rotation (/v1/rotate) flow. The rotation handler derives the\nsealing scope for the newly encrypted output from untrusted\nspec.template.metadata.annotations present in the input SealedSecret.\nBy submitting a victim SealedSecret to the rotate endpoint with the\nannotation sealedsecrets.bitnami.com/cluster-wide=true injected into the\ntemplate metadata, a remote attacker can obtain a rotated version of the\nsecret that is cluster-wide. This bypasses original \"strict\" or\n\"namespace-wide\" constraints, allowing the attacker to retarget and unseal\nthe secret in any namespace or under any name to recover the plaintext\ncredentials.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Bitnami Sealed Secrets is vulnerable to a scope-widening attack during\nthe secret rotation (/v1/rotate) flow. The rotation handler derives the\nsealing scope for the newly encrypted output from untrusted\nspec.template.metadata.annotations present in the input SealedSecret.\nBy submitting a victim SealedSecret to the rotate endpoint with the\nannotation sealedsecrets.bitnami.com/cluster-wide=true injected into the\ntemplate metadata, a remote attacker can obtain a rotated version of the\nsecret that is cluster-wide. This bypasses original \"strict\" or\n\"namespace-wide\" constraints, allowing the attacker to retarget and unseal\nthe secret in any namespace or under any name to recover the plaintext\ncredentials.","source":"cvelist"},{"lang":"en","text":"This report shows a scope-widening issue in the rotate (re-encrypt) flow: the output scope can be derived from untrusted `spec.template.metadata.annotations` on the input sealed secret.\n\nIf a victim sealed secret is strict- or namespace-scoped, an attacker who can submit it to the rotate endpoint can set `sealedsecrets.bitnami.com/cluster-wide=true` in the template metadata and receive a rotated sealed secret that is cluster-wide, enabling retargeting (`metadata.name`/`metadata.namespace`) and unsealing to recover the victim plaintext.\n\n## Relevant Links (Pinned)\n\n- Rotate handler uses `NewSealedSecret(..., secret)` after unsealing: https://github.com/bitnami-labs/sealed-secrets/blob/946bc048f3407117c837da6e4300686522d4c4eb/pkg/controller/controller.go#L560-L606\n- Scope derivation reads secret annotations (`SecretScope`): https://github.com/bitnami-labs/sealed-secrets/blob/946bc048f3407117c837da6e4300686522d4c4eb/pkg/apis/sealedsecrets/v1alpha1/sealedsecret_expansion.go#L112-L122\n\n## Root Cause\n\nThe rotate flow unseals the input sealed secret to a `Secret`, then reseals using `NewSealedSecret(..., secret)`.\n\nBecause `SecretScope(secret)` is computed from secret annotations, and unsealing applies `spec.template` metadata onto the unsealed secret, an attacker can influence the scope of the rotated output by mutating template annotations on the rotate input.\n\n## Attack Path\n\n1. Attacker obtains a victim `SealedSecret` object (for example via read access to resources or logs) and can submit it to the controller rotate endpoint.\n2. Attacker sets `spec.template.metadata.annotations.sealedsecrets.bitnami.com/cluster-wide=true` (and optionally retargets name/namespace fields).\n3. Rotate returns a resealed, cluster-wide sealed secret that is no longer bound to the victim name/namespace.\n4. Attacker unseals the rotated output in their chosen namespace/name to recover the victim plaintext.\n\n## Proof of Concept\n\nSetup + run:\n\n```bash\nunzip poc.zip -d poc\ncd poc\nmake test\n```\n\nCanonical output (excerpt):\n\n```\n[CALLSITE_HIT]: pkg/apis/sealedsecrets/v1alpha1/sealedsecret_expansion.go:112 SecretScope\n[PROOF_MARKER]: scope_widened=true rotated_scope=cluster-wide\n```\n\nControl output (excerpt):\n\n```\n[NC_MARKER]: scope_widened=false strict_scope_preserved=true\n```\n\n## Fix Accepted When\n\nRotate preserves the original sealing scope and does not allow scope widening based on untrusted template metadata; strict or namespace-wide inputs cannot produce cluster-wide outputs.\n\n[poc.zip](https://github.com/user-attachments/files/25080027/poc.zip)\n[PR_DESCRIPTION.md](https://github.com/user-attachments/files/25080028/PR_DESCRIPTION.md)\n[attack_scenario.md](https://github.com/user-attachments/files/25080029/attack_scenario.md)","format":"markdown","source":"ghsa"},{"lang":"en","text":"Sealed Secrets for Kubernetes: Rotate API Allows Scope Widening from Strict/Namespace-Wide to Cluster-Wide via Untrusted Template Annotations in github.com/bitnami-labs/sealed-secrets","format":"markdown","source":"go"},{"lang":"es","text":"Bitnami Sealed Secrets es vulnerable a un ataque de ampliación de alcance durante el flujo de rotación de secretos (/v1/rotate). El gestor de rotación deriva el alcance de sellado para la salida recién cifrada de anotaciones no confiables spec.template.metadata.annotations presentes en el SealedSecret de entrada. Al enviar un SealedSecret víctima al endpoint de rotación con la anotación sealedsecrets.bitnami.com/cluster-wide=true inyectada en los metadatos de la plantilla, un atacante remoto puede obtener una versión rotada del secreto que es a nivel de clúster. Esto elude las restricciones originales 'strict' o 'namespace-wide', permitiendo al atacante reorientar y desellar el secreto en cualquier espacio de nombres o bajo cualquier nombre para recuperar las credenciales en texto plano.","source":"nvd"}],"published":"2026-02-26T00:50:00.863Z","modified":"2026-09-10T03:50:34.020Z","severity":{"scorer":"vmware","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N","score":4.9,"rating":"MEDIUM"},"severities":[{"scorer":"vmware","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N","score":4.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N","score":4.9,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-284"],"affected":[{"ranges":[{"type":"custom","introduced":"0.35.0","fixed":"<0.36.0","status":"affected"}],"vendor":"Bitnami","product":"sealed-secrets","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.36.0"}],"ecosystem":"Go","package":"github.com/bitnami-labs/sealed-secrets","purl":"pkg:golang/github.com/bitnami-labs/sealed-secrets","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.36.0"}],"ecosystem":"Go","package":"github.com/bitnami-labs/sealed-secrets","purl":"pkg:golang/github.com/bitnami-labs/sealed-secrets","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.36.0"}],"ecosystem":"Bitnami","package":"sealed-secrets","purl":"pkg:bitnami/sealed-secrets","source":"bitnami"}],"references":[{"url":"https://github.com/bitnami-labs/sealed-secrets/security/advisories/GHSA-465p-v42x-3fmj","tags":["advisory","web"],"sources":["cvelist","ghsa","go","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22728","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/bitnami-labs/sealed-secrets/commit/d57ee4a8357d250e602b995399b525496ab688c1","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/bitnami-labs/sealed-secrets","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/bitnami-labs/sealed-secrets/releases/tag/v0.36.0","tags":["web"],"sources":["ghsa","go"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-22728","tags":["web"],"sources":["bitnami"]}],"credits":[],"assigner":"vmware","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-02-26T15:58:00.603Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-22728","url":"https://www.cve.org/CVERecord?id=CVE-2026-22728","licence":"CVE Terms of Use","modified":"2026-02-26T15:58:32.372Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-465p-v42x-3fmj","url":"https://github.com/advisories/GHSA-465p-v42x-3fmj","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:34.020Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-4565","url":"https://pkg.go.dev/vuln/GO-2026-4565","licence":"CC-BY-4.0","modified":"2026-03-23T05:11:29.088Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-22728","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22728","licence":"Public domain","modified":"2026-06-17T10:20:18.457Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-SEALED-SECRETS-2026-22728","url":"https://osv.dev/vulnerability/BIT-SEALED-SECRETS-2026-22728","licence":"Apache-2.0","modified":"2026-03-23T04:56:00.640Z"}],"updatedAt":"2026-11-25T22:59:14.931Z","epss":{"score":0.00603,"percentile":0.42994,"date":"2026-11-30T12:00:22.000Z"}}