Skip to content

About

A Kubernetes security project that exploits React2Shell (CVE-2025-55182) in a Next.js application on Amazon EKS, investigates the breach, tests layered defenses, and integrates security into delivery.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

136 Commits

Folders and files

Repository files navigation

React2Shell on Amazon EKS

One vulnerability. Four layers. Attack, Respond, Harden, Integrate.

A Kubernetes security project that exploits React2Shell (CVE-2025-55182) in a Next.js application on Amazon EKS, investigates the breach, tests layered defenses, and integrates security into delivery.

Layers: code, container, cluster, and cloud.

React Amazon EKS Kubernetes Terraform Argo CD GitHub Actions


Security and Business Challenge

  • AI accelerates application delivery, but security misconfigurations can turn a single application flaw into a breach across container, cluster, and cloud resources.

How can teams maintain delivery speed while containing breaches and integrating security across all four layers?

This project traces a React2Shell breach on Amazon EKS and tests the defenses across:

  • Four layers: code, container, cluster, and cloud.
  • Four perspectives: attacker, platform administrator, security specialist, and DevSecOps engineer.

Four security perspectives across code, container, cluster, and cloud


Attack — Application Breach with react2shell

An attacker exploits React2Shell to execute commands inside the application container.

The breach exposes container secrets, Kubernetes resources, an internal API, and a dummy RDS credential in AWS Secrets Manager through an overly permissive IRSA role.

  • Attack chain across code, container, cluster, and cloud

React2Shell attack path from the application to cluster and cloud resources

  • Container secret exposed through the compromised application

Container secret retrieved through React2Shell


Respond — Investigation and Containment

The platform administrator traces credential access using CloudTrail events and pod logs. Pause Argo CD reconciliation, preserve evidence, isolate the pod, and document the incident.

  • CloudTrail evidence of suspicious role activity

CloudTrail events showing suspicious role activity

  • Pod isolation through blocked ingress and egress

NetworkPolicy isolating the compromised pod


Harden — Defense in Depth

The security specialist removes broad cloud permissions, restricts RBAC, enforces NetworkPolicies, and hardens pod security settings.

Replaying the attack after each change shows where access is blocked. Patching the application and using a non-root distroless image complete the hardening.

  • Defenses across code, container, cluster, and cloud

Layered hardening controls


Integrate — DevSecOps

Shift left: the DevSecOps engineer adds Trivy checks in GitHub Actions for dependencies, images, Kubernetes manifests, and Terraform. Monitoring: cloud audit logs support investigation; a sample finding verifies the GuardDuty → EventBridge → SNS alert path.

  • GitHub Actions workflow: build, scan, and publish

GitHub Actions image build and security scan workflow


Demo Documentation

About

A Kubernetes security project that exploits React2Shell (CVE-2025-55182) in a Next.js application on Amazon EKS, investigates the breach, tests layered defenses, and integrates security into delivery.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages