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 Type | Indicator |
|---|---|
| Malicious Rust dependency | onering version 1.4.1 |
| Package registry | crates.io |
| Exfiltration endpoint | https://o4511539639222272.ingest.de.sentry.io/api/4511539669368912/envelope/ |
| Domain | o4511539639222272.ingest.de.sentry.io |
| HTTP method | POST |
| HTTP content type | application/x-sentry-envelope |
| Sentry DSN public key | 8197ee42c4f59c83f4cc6d48f5bae821 |
| Sentry organization ID | o4511539639222272 |
| Sentry project ID | 4511539669368912 |
| Suspicious build artifact | build.rs |
| Git collection command | git diff HEAD^ HEAD |
| Git metadata command | git log -n 1 |
| Potential local artifact | data.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

