CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-G38R-8GMR-GHRF

GHSA-G38R-8GMR-GHRF: Malicious Code Execution via build.rs in Rust Crate mysten-metrics

Alon Barad
Alon Barad
Software Engineer

May 4, 2026·5 min read·16 visits

Executive Summary (TL;DR)

A malicious Rust crate named `mysten-metrics` executes data exfiltration scripts via `build.rs` upon compilation. Developers who compiled this crate must assume their local environment is compromised and immediately rotate all local and cloud credentials.

The `mysten-metrics` Rust crate was published as a malicious package to the crates.io registry. It utilizes a malicious `build.rs` script to execute arbitrary code during the compilation phase, enabling the silent exfiltration of sensitive developer environment variables, SSH keys, and cloud credentials to an external server.

Vulnerability Overview

The mysten-metrics package was published to the Rust crates.io registry as a malicious payload disguised as a legitimate library. The crate impersonates infrastructure components associated with the Mysten Labs ecosystem to trick developers into including it in their dependency trees. The registry maintainers removed the package after identifying its malicious behavior.

This incident represents a direct supply chain attack leveraging the Rust build process. The package contained a single version (0.1.0) and lacked any legitimate functional code or external dependencies. Its sole purpose was to execute malicious routines during the compilation phase on the developer's machine or within a continuous integration pipeline.

The vulnerability class is categorized as Embedded Malicious Code (CWE-506). Because the payload triggers automatically upon compilation, the attack requires minimal interaction from the victim beyond the initial inclusion of the dependency. The exfiltration of environment variables and configuration files presents a severe risk to organizational security.

Root Cause Analysis

The attack vector relies on the standard functionality of build.rs scripts within the Cargo build system. Cargo allows crate authors to include a build script to perform pre-compilation tasks such as generating bindings, compiling C code, or setting configuration flags. This script compiles and runs on the host machine before the main crate compilation begins.

When a developer executes cargo build, cargo test, or cargo check, Cargo automatically compiles the build.rs file into an executable and runs it. The executable runs with the exact same privileges as the user invoking the Cargo command. Cargo does not sandbox or restrict the system access of the build script by default.

The malicious actor abused this design by placing data exfiltration routines directly inside the build.rs file. Because the package possessed no legitimate functionality, the build script served exclusively as the payload delivery mechanism. The lack of execution boundaries allows the script to read arbitrary files and open outbound network connections without user consent or notification.

Exploit Mechanics and Execution Flow

The execution of the malicious payload requires the victim to add mysten-metrics to their Cargo.toml file and run a Cargo command. Once triggered, the compiled build.rs executable scans the local environment for sensitive configuration files and credentials. Targets specifically include standard paths for SSH keys, Cargo registry tokens, and cloud provider configuration files.

After gathering local files, the script iterates through all active environment variables accessible to the build process. Environment variables frequently contain API keys, database connection strings, and continuous integration secrets. The collected data is then serialized into a JSON payload or encoded format for transmission.

The final stage of the exploit involves transmitting the gathered secrets to an external server controlled by the attacker. The script uses standard network sockets to execute an HTTP POST request containing the stolen data. The process occurs silently in the background, allowing the standard build process to fail or complete without explicitly alerting the developer to the data theft.

Impact Assessment

The impact of compiling the mysten-metrics crate is the immediate and silent compromise of the host environment. An attacker gains access to all secrets readable by the user executing the build command. This typically includes source code repository access, cloud infrastructure control, and internal network credentials.

If the crate is compiled on a developer's local workstation, the attacker obtains personal access tokens and SSH keys, enabling lateral movement into organizational repositories. If compiled within a Continuous Integration/Continuous Deployment (CI/CD) pipeline, the impact often escalates to complete infrastructure compromise. CI/CD environments routinely hold highly privileged service account credentials required for production deployments.

The exfiltration occurs instantly upon the first build attempt. There is no persistence mechanism required for the attacker to achieve their primary objective. The compromised credentials can be utilized immediately or sold to initial access brokers, making rapid incident response critical.

Remediation and Incident Response

Organizations must assume full environment compromise if the mysten-metrics crate was downloaded and compiled. The primary remediation step requires the immediate rotation of all secrets present on the affected machine or CI/CD runner. This includes resetting cloud provider credentials, revoking SSH keys, and generating new API tokens.

Developers must remove the dependency from all Cargo.toml files and audit their Cargo.lock files to ensure no transitive inclusion occurred. Local environments require sanitization by running cargo clean and clearing the Cargo registry cache located at ~/.cargo/registry/. Security teams should review network logs for outbound connections from build machines to identify successful exfiltration events.

To prevent future supply chain compromises, development teams should implement dependency auditing tools such as cargo-audit. Organizations should also explore sandboxing local build environments and CI/CD runners to restrict outbound network access and file system reads during the compilation process.

Official Patches

RustSecRustSec Advisory confirming removal of package
GitHub Advisory DatabaseGitHub Advisory for GHSA-G38R-8GMR-GHRF

Technical Appendix

CVSS Score
10.0/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Affected Systems

Rust Developer WorkstationsContinuous Integration / Continuous Deployment (CI/CD) pipelines running Cargo

Affected Versions Detail

Product
Affected Versions
Fixed Version
mysten-metrics
crates.io
All versions (including 0.1.0)None (Removed)
AttributeDetail
CWE IDCWE-506
Attack VectorSupply Chain / Malicious Dependency
Execution Triggercargo build / compilation phase
Exploit StatusActive
Target Operating SystemsAll OS (Cross-platform execution)
ImpactHigh (Data Exfiltration / Credential Theft)

MITRE ATT&CK Mapping

T1195.001Compromise Software Dependencies and Development Tools
Supply Chain Compromise
T1059Command and Scripting Interpreter
Execution
T1552Unsecured Credentials
Credential Access
T1048Exfiltration Over Alternative Protocol
Exfiltration
CWE-506
Embedded Malicious Code

Embedded Malicious Code that performs actions contrary to the security interests of the developer.

Known Exploits & Detection

crates.ioActive deployment of malicious package on the public registry.

Vulnerability Timeline

Malicious crate `mysten-metrics` published to crates.io.
2026-04-20
Malicious activity reported to security maintainers.
2026-04-22
Official security advisory issued; package removed from crates.io.
2026-04-24
GHSA-G38R-8GMR-GHRF and RUSTSEC-2026-0107 published.
2026-04-24

References & Sources

  • [1]GitHub Advisory: GHSA-G38R-8GMR-GHRF
  • [2]RustSec Advisory: RUSTSEC-2026-0107
  • [3]Meterian Vulnerability Database Entry
  • [4]CIRCL Vulnerability Feed

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 4 hours ago•CVE-2026-50751
9.3

CVE-2026-50751: Authentication Bypass in Check Point Security Gateway IKEv1 Legacy Validation

An improper authentication vulnerability (CWE-287) exists in the legacy, deprecated Internet Key Exchange version 1 (IKEv1) key exchange protocol implementation in Check Point Security Gateways. The vulnerability is caused by a logic flow weakness during the certificate validation process for Remote Access VPN and Mobile Access (SSL VPN) connections. An unauthenticated remote attacker can exploit this weakness to bypass user authentication entirely, establishing a fully functional Remote Access VPN connection without a valid password.

Alon Barad
Alon Barad
19 views•6 min read
•about 18 hours ago•CVE-2026-39922
6.3

CVE-2026-39922: Server-Side Request Forgery in GeoNode Service Registration Endpoint

GeoNode versions prior to 4.4.5 and 5.0.2 are vulnerable to Server-Side Request Forgery (SSRF) in the service registration endpoint. Authenticated attackers with low privileges can exploit insufficient input validation in the Web Map Service (WMS) registration module to force the application server to make outbound network queries to loopback addresses, private RFC1918 subnets, link-local scopes, and cloud metadata endpoints. This technical report details the mechanics of the vulnerability, the underlying architectural flaw, and how to effectively remediate and mitigate the associated security risks.

Alon Barad
Alon Barad
4 views•7 min read
•1 day ago•CVE-2022-0492
7.8

CVE-2022-0492: Privilege Escalation and Container Escape via cgroups v1 release_agent

CVE-2022-0492 is a high-severity missing authorization vulnerability in the Linux kernel's Control Groups (cgroups) v1 implementation. The flaw resides within the cgroup_release_agent_write function in kernel/cgroup/cgroup-v1.c, where the kernel fails to validate if the process writing to the release_agent file possesses administrative capabilities in the initial user namespace. This allows a local attacker inside a container with root privileges (UID 0) to abuse user namespaces, mount a cgroups v1 directory, modify the release_agent parameter, and execute arbitrary commands on the host system as host root, effectively achieving a complete container escape.

Amit Schendel
Amit Schendel
12 views•7 min read
•3 days ago•GHSA-G72G-R7M4-9X4G
6.3

GHSA-G72G-R7M4-9X4G: Insufficient Session Expiration of OAuth Tokens in NocoDB

NocoDB is subject to an insufficient session expiration vulnerability where OAuth access and refresh tokens are not invalidated or revoked during security-sensitive actions such as password changes, forgot-password requests, or password resets. This allows an attacker possessing an active OAuth token to maintain unauthorized persistence.

Amit Schendel
Amit Schendel
12 views•6 min read
•3 days ago•GHSA-FGMC-2HQJ-86V4
6.9

GHSA-FGMC-2HQJ-86V4: Default Administrative Credentials in vantage6-server

A vulnerability in the vantage6 federated learning framework allows unauthenticated remote attackers to gain administrative control of the server via hardcoded default credentials (root/root) when deployed under default configurations in versions 4.2.3 and below.

Amit Schendel
Amit Schendel
8 views•5 min read
•3 days ago•GHSA-X9F6-9RVM-MMRG
6.9

GHSA-X9F6-9RVM-MMRG: Improper Access Control and Volume Mount Isolation Bypass in vantage6 Node

An improper access control vulnerability in the vantage6 node component allows concurrently running algorithm containers to read and modify sensitive input and output files of other tasks. The lack of strict workspace directory isolation exposes a significant attack surface in multi-tenant or federated environments where untrusted algorithms are executed.

Amit Schendel
Amit Schendel
4 views•4 min read