GHSA-rp7v-4384-hfrp: Github.com/k8sgpt ai/k8sgpt K8sGPT Has Prompt Injection Through Vulnerability

HIGH
CWE-502 CWE-20 CWE-915
Published
Advisory Summary

GHSA-rp7v-4384-hfrp is a HIGH k8sgpt has prompt injection through vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Github.com/k8sgpt ai/k8sgpt libraries in the Go ecosystem. The issue involves k8sgpt has prompt injection through its k8sgpt-operator. Remediation is available by upgrading affected packages to version 0.4.32.

GHSA-rp7v-4384-hfrp at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-rp7v-4384-hfrp
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Github.com/k8sgpt ai/k8sgpt
Package Ecosystem Go
Published Date
Last Updated

How to Fix GHSA-rp7v-4384-hfrp

To remediate this vulnerability, upgrade all affected Github.com/k8sgpt ai/k8sgpt dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/k8sgpt-ai/k8sgpt fixed: 0.4.32
Upgrade github.com/k8sgpt-ai/k8sgpt to 0.4.32
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/k8sgpt-ai/k8sgpt

How to Check if You Are Affected

To determine whether your application is affected by GHSA-rp7v-4384-hfrp, inspect your project dependencies for Github.com/k8sgpt ai/k8sgpt:

inspect dependencies for github.com/k8sgpt-ai/k8sgpt

Analyze the terminal output to locate any version of Github.com/k8sgpt ai/k8sgpt in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.32), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Github.com/k8sgpt ai/k8sgpt, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary In the auto-remediation pipeline, `object_to_execution.go` was deserializing the AI-generated YAML directly into a Deployment object, but there was lack of validation from the original Deployment object. ### Details This issue was fixed after coordination with Alex Jones. ### PoC To minimize the impact, the PoC of this vulnerability wasn't released, but was shared with the maintainers.

GHSA-rp7v-4384-hfrp Affected Github.com/k8sgpt ai/k8sgpt Versions

1 component(s)
Fixed Versions:
0.4.32
Product / Package Ecosystem Affected Versions Fixed Version
github.com/k8sgpt-ai/k8sgpt
Go
< 0.4.32
0.4.32

References

Frequently Asked Questions

What is GHSA-rp7v-4384-hfrp?
GHSA-rp7v-4384-hfrp is a security vulnerability in Github.com/k8sgpt ai/k8sgpt involving k8sGPT has Prompt Injection through its k8sGPT-Operator under CWE-502: Deserialization of Untrusted Data.
Which Github.com/k8sgpt ai/k8sgpt versions are affected?
Affected versions include releases prior to 0.4.32 across affected packages: github.com/k8sgpt-ai/k8sgpt.
What version fixes GHSA-rp7v-4384-hfrp?
Upgrading to 0.4.32 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/k8sgpt-ai/k8sgpt affected?
Yes, github.com/k8sgpt-ai/k8sgpt is affected in releases prior to 0.4.32. Upgrade your dependency to 0.4.32 or later.
What CWE is associated with GHSA-rp7v-4384-hfrp?
GHSA-rp7v-4384-hfrp is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Go dependencies for GHSA-rp7v-4384-hfrp?
Run the dependency tree command: 'inspect dependencies for github.com/k8sgpt-ai/k8sgpt'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rp7v-4384-hfrp",
  "modified" : "2026-04-24T16:37:12Z",
  "published" : "2026-04-24T16:37:12Z",
  "aliases" : [ ],
  "summary" : "k8sGPT has Prompt Injection through its k8sGPT-Operator",
  "details" : "### Summary\nIn the auto-remediation pipeline, `object_to_execution.go` was deserializing the AI-generated YAML directly into a Deployment object, but there was lack of validation from the original Deployment object.\n\n### Details\nThis issue was fixed after coordination with Alex Jones.\n\n### PoC\nTo minimize the impact, the PoC of this vulnerability wasn't released, but was shared with the maintainers.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/k8sgpt-ai/k8sgpt"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.4.32"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/k8sgpt-ai/k8sgpt/security/advisories/GHSA-rp7v-4384-hfrp"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/k8sgpt-ai/k8sgpt"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-502", "CWE-915" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-24T16:37:12Z",
    "nvd_published_at" : null
  }
}