Description
Security policies like [`allowed-gadgets`](https://inspektor-gadget.io/docs/latest/reference/restricting-gadgets), [`disallow-pulling`](https://inspektor-gadget.io/docs/latest/reference/disallow-pulling), [`verify-image`](https://inspektor-gadget.io/docs/latest/reference/verify-assets#verify-image-based-gadgets) can be bypassed by a malicious client.
### Impact
Users running `ig` in daemon mode or IG on Kubernetes that rely on any of the features mentioned above are vulnerable to this issue. In order to exploit this, the client needs access to the server, like the correct TLS certificates on the `ig daemon` case or access to the cluster in the Kubernetes case.
### Patches
The issue has been fixed in v0.40.0
### Workarounds
There is not known workaround to fix it.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Go | github.com/inspektor-gadget/inspektor-gadget | >= 0.31.0, < 0.40.0 | 0.40.0 | GHSA-pv22-fqcj-7xwh |
References
- https://github.com/inspektor-gadget/inspektor-gadget/security/advisories/GHSA-pv22-fqcj-7xwh web
- https://github.com/inspektor-gadget/inspektor-gadget/commit/c51d419964f5b6f9344fcad4faba70e2e025212b web
- https://github.com/inspektor-gadget/inspektor-gadget package
- https://pkg.go.dev/vuln/GO-2025-3665 web