Saturday, November 7, 2026

Compromised Rust Crate With 18,000+ Downloads Steals Source Code During Builds

A malicious update to the Rust crate called onering has been discovered, which exfiltrates source code changes from developers’ machines during the build process.

Security researchers identified this behavior in version 1.4.1 of the package on June 10, 2026. The onering crate, designed as a high-throughput synchronous queue and channels library, has garnered over 18,000 downloads on crates.io, marking this incident as a significant software supply chain compromise affecting open-source developers.

Compromised Rust Crate Steals Source Code

The compromise is particularly alarming because the malicious payload executes automatically when a dependent Rust project is compiled.

The infected version introduced a build.rs file, which is a Cargo build script that compiles and runs locally during package installation or project builds.

Developers do not need to invoke any library APIs for the malicious functionality to execute; simply including the affected dependency and building the project is enough to trigger data collection and transmission.

According to the Aikido, the injected build script first identifies the project’s root directory that consumes the crate. Rather than operating solely within the owning package directory, it moves upward from Cargo’s OUT_DIR environment variable until it locates the project’s target directory, then selects the target directory’s parent as the repository’s root.

This allows the payload to target the developer’s Git repository and collect information that is unrelated to the package itself.

The script then executes Git commands against the identified repository. One command retrieves metadata from the latest commit, including the commit hash, author name, email address, timestamp, and subject line.

A second command runs `git diff HEAD^ HEAD`, collecting the complete textual difference between the most recent commit and its predecessor.

This data can expose newly added or modified proprietary code, implementation details, secrets inadvertently committed to source control, security fixes, and unreleased product features.

Since the build script can execute whenever the dependency is rebuilt, the risk extends beyond a one-time leak. Each affected build can send the latest commit’s diff to an external server, potentially creating a continuous record of source code changes over time.

This approach differs from many recent compromises in the package ecosystem that have focused on stealing developer credentials, API tokens, cryptocurrency wallet data, or cloud access keys. In this case, the apparent objective is direct collection of source code and development activity.

To avoid raising immediate suspicion, the exfiltration traffic is formatted to resemble a legitimate Sentry telemetry event. The malware packages commit metadata as event tags and embeds the Git patch in an extra.patch field before sending it through an HTTP POST request to a Sentry ingest endpoint.

This traffic may appear harmless to defenders because Sentry endpoints are commonly associated with error reporting and application observability.

The payload reportedly also contains a commented-out line that would write the collected content to a local data.txt file, suggesting that the malicious routine may have been tested locally before enabling network exfiltration.

The threat extends beyond crates.io users. Researchers indicated that the maintainer’s GitHub repository also appeared compromised, meaning developers who sourced onering directly from Git rather than the official registry may have also obtained the malicious code.

Organizations should immediately audit Rust lockfiles, dependency manifests, build logs, proxy records, and endpoint telemetry for the use of onering version 1.4.1 and connections to the identified Sentry ingest infrastructure.

Developers should remove or pin the dependency to a known safe version after validating its provenance, rotate any secrets that may have appeared in recent commits, and review the Git history for sensitive changes.

This incident highlights how build scripts can turn dependency installation into code execution, and underscores the need for Rust teams to implement dependency reviews, lockfile monitoring, network controls during builds, and alerting for unexpected Git or outbound HTTP activity.

Indicators of Compromise

IOC TypeIndicator
Malicious Rust dependencyonering version 1.4.1
Package registrycrates.io
Exfiltration endpointhttps://o4511539639222272.ingest.de.sentry.io/api/4511539669368912/envelope/
Domaino4511539639222272.ingest.de.sentry.io
HTTP methodPOST
HTTP content typeapplication/x-sentry-envelope
Sentry DSN public key8197ee42c4f59c83f4cc6d48f5bae821
Sentry organization IDo4511539639222272
Sentry project ID4511539669368912
Suspicious build artifactbuild.rs
Git collection commandgit diff HEAD^ HEAD
Git metadata commandgit log -n 1
Potential local artifactdata.txt

Note: IP addresses and domains are intentionally defanged (e.g., [.]) to prevent accidental resolution or hyperlinking. Re-fang only within controlled threat intelligence platforms such as MISP, VirusTotal, or your SIEM.

Prevent incidents due to slow investigations. Power your Tier 1 with threat intelligence from 15K SOCs: Integrate TI Lookup in your SOC

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Hot this week

How To Access Dark Web Anonymously and know its Secretive and Mysterious Activities

What is Deep Web The deep web, invisible web, or...

How to Build and Run a Security Operations Center (SOC Guide) – 2023

Today’s Cyber security operations center (CSOC) should have everything...

Russian Hackers Bypass EDR to Deliver a Weaponized TeamViewer Component

TeamViewer's popularity and remote access capabilities make it an...

Web Server Penetration Testing Checklist – 2026

Web server pentesting is performed under three significant categories: identity,...

ATM Penetration Testing – Advanced Testing Methods to Find The Vulnerabilities

ATM Penetration testing, Hackers have found different approaches to...

Insignary Releases Free Insignary-Chk Tool to Detect PHP2Shell and Node2Shell Exposure

Toronto, Canada, November 6th, 2026, CyberNewswire Free, read-only scanner helps...

Dark Project Ransomware Gang Claims 38 Victims Across 8 Countries, Targeting Healthcare and Manufacturing

Dark Project, an emerging financially motivated ransomware operation, has...

Hackers Use Fake Streaming Apps to Spread Mirax Android Malware and Steal Bank Accounts

Hackers are using streaming app lures to distribute Mirax....

Hackers Put AI Agents on Autopilot to Steal Gaming Accounts and Apple Signing Certificates

ARTEX, a Chinese open-source agentic penetration-testing platform, to run...

Claude AI Flaw Lets Malicious Browser Extensions Execute Commands on Remote Computers

A design flaw in Anthropic's Claude Dispatch feature let...

ChatGPT Lockdown Mode Bypass Allowed Hackers to Steal Private Chats Without User Interaction

Research found a flaw that bypassed ChatGPT's Lockdown Mode....

11 Security Policy Management Tools: The 2026 Buyer’s Verdict Guide

“Security policy management” names two different markets wearing one...

11 IT & Cyber Risk Management Tools: The 2026 Buyer’s Verdict Guide

IT and cyber risk management tooling is the register...

Related Articles

Recent News