GHSA-rp7v-4384-hfrp k8sGPT has Prompt Injection through its k8sGPT-Operator

Not scored Published

Attackers can exploit prompt injection in k8sGPT to execute arbitrary code or escalate privileges via unsafe deserialization of AI-generated YAML.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is GHSA-rp7v-4384-hfrp?

GHSA-rp7v-4384-hfrp is an unsafe deserialization vulnerability in github.com/k8sgpt-ai/k8sgpt, published on 24 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Which versions are affected by GHSA-rp7v-4384-hfrp?

3 open source packages ship an affected version, including github.com/k8sgpt-ai/k8sgpt.

PackageAffectedFixed in
github.com/k8sgpt-ai/k8sgpt GoAll versions0.4.32
github.com/k8sgpt-ai/k8sgpt GoAll versions0.4.32
github.com/k8sgpt-ai/k8sgpt GoAll versions0.4.32

How do I fix GHSA-rp7v-4384-hfrp?

Upgrade github.com/k8sgpt-ai/k8sgpt to 0.4.32 or later.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is GHSA-rp7v-4384-hfrp being exploited?

There is no known exploitation of GHSA-rp7v-4384-hfrp in the wild and no public exploit code.

Sources

Also known as GO-2026-5631.

Is GHSA-rp7v-4384-hfrp in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free