CWE-506
Allowed-with-ReviewEmbedded Malicious Code
Abstraction: Class · Status: Incomplete
The product contains code that appears to be malicious in nature.
524 vulnerabilities reference this CWE, most recent first.
GHSA-XMPW-2VMM-P4P6
Vulnerability from github – Published: 2026-05-19 15:40 – Updated: 2026-06-09 13:13Impact
On May 11, 2026 at approximately 6:00 PM Pacific, an attacker published a malicious version of guardrails-ai (0.10.1) to PyPI.
Affected: any user who installed guardrails-ai==0.10.1 from PyPI on May 11, 2026.
Security researchers identified the malicious package within approximately 2 hours of publication, and PyPI quarantined the repository. Based on our telemetry, we have observed no requests to Guardrails AI infrastructure originating from the malicious 0.10.1 version, and a review of system and access logs has produced no evidence of user data exfiltration through our systems.
For the full timeline, technical details, and remediation steps we have taken, see SECURITY_ADVISORY.md.
Patches
No patched version above 0.10.1 is available yet. Downgrade to 0.10.0, which is unaffected.
Workarounds
1. Pin to a safe version:
guardrails-ai==0.10.0
2. While the PyPI quarantine is active, install from GitHub:
pip install git+https://github.com/guardrails-ai/guardrails.git@v0.10.0
The v0.10.0 tag in this repository is clean. Track quarantine status here: #1473.
3. If you installed 0.10.1, treat the host as potentially compromised. Rotate any credentials accessible from that machine (GitHub PATs, cloud provider keys, package registry tokens, API keys) and audit your GitHub account for unauthorized workflows or repositories.
4. Snowglobe and Guardrails Hub users : all Snowglobe and Guardrails Hub API keys will be invalidated at 2:00 PM Pacific on May 13, 2026. Rotate yours before then to avoid service interruption.
References
- Full advisory, timeline, and remediation details: SECURITY_ADVISORY.md
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "guardrails-ai"
},
"versions": [
"0.10.1"
]
}
],
"aliases": [
"CVE-2026-45758"
],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-19T15:40:44Z",
"nvd_published_at": "2026-06-05T20:17:32Z",
"severity": "CRITICAL"
},
"details": "### Impact\n\nOn May 11, 2026 at approximately 6:00 PM Pacific, an attacker published a malicious version of `guardrails-ai` (0.10.1) to PyPI.\n\n**Affected:** any user who installed `guardrails-ai==0.10.1` from PyPI on May 11, 2026.\n\nSecurity researchers identified the malicious package within approximately 2 hours of publication, and PyPI quarantined the repository. Based on our telemetry, we have observed no requests to Guardrails AI infrastructure originating from the malicious 0.10.1 version, and a review of system and access logs has produced no evidence of user data exfiltration through our systems.\n\nFor the full timeline, technical details, and remediation steps we have taken, see [SECURITY_ADVISORY.md](https://github.com/guardrails-ai/guardrails/blob/main/SECURITY_ADVISORY.md).\n\n### Patches\n\nNo patched version above 0.10.1 is available yet. **Downgrade to `0.10.0`**, which is unaffected.\n\n### Workarounds\n\n**1. Pin to a safe version:**\n\n`guardrails-ai==0.10.0`\n\n**2. While the PyPI quarantine is active, install from GitHub:**\n\n`pip install git+https://github.com/guardrails-ai/guardrails.git@v0.10.0`\n\nThe `v0.10.0` tag in this repository is clean. Track quarantine status here: [#1473](https://github.com/guardrails-ai/guardrails/issues/1473).\n\n**3. If you installed 0.10.1, treat the host as potentially compromised.** Rotate any credentials accessible from that machine (GitHub PATs, cloud provider keys, package registry tokens, API keys) and audit your GitHub account for unauthorized workflows or repositories.\n\n**4. Snowglobe and Guardrails Hub users :** all Snowglobe and Guardrails Hub API keys will be invalidated at 2:00 PM Pacific on May 13, 2026. Rotate yours before then to avoid service interruption.\n\n### References\n\n- Full advisory, timeline, and remediation details: [SECURITY_ADVISORY.md](https://github.com/guardrails-ai/guardrails/blob/main/SECURITY_ADVISORY.md)",
"id": "GHSA-xmpw-2vmm-p4p6",
"modified": "2026-06-09T13:13:18Z",
"published": "2026-05-19T15:40:44Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/guardrails-ai/guardrails/security/advisories/GHSA-xmpw-2vmm-p4p6"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-45758"
},
{
"type": "WEB",
"url": "https://github.com/guardrails-ai/guardrails/issues/1473"
},
{
"type": "PACKAGE",
"url": "https://github.com/guardrails-ai/guardrails"
},
{
"type": "WEB",
"url": "https://github.com/guardrails-ai/guardrails/blob/main/SECURITY_ADVISORY.md"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/guardrails-ai/PYSEC-2026-206.yaml"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Malicious code in guardrails-ai 0.10.1 (supply chain compromise)"
}
GHSA-XP79-9MXW-878J
Vulnerability from github – Published: 2026-02-12 22:10 – Updated: 2026-02-12 22:10This attempts to typosquat the existing crate finch to steal credentials from local files.
The malicious crate had 1 version published on 2025-12-08 and had been downloaded 21 times. There were no crates depending on this crate on crates.io.
Thanks to Matthias Zepper of NGI Sweden for reporting this to the crates.io team!
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "finch-rst"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2026-02-12T22:10:23Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "This attempts to typosquat the existing crate [`finch`](https://crates.io/crates/finch) to steal credentials from local files.\n\nThe malicious crate had 1 version published on 2025-12-08 and had been downloaded 21 times. There were no crates depending on this crate on crates.io.\n\nThanks to Matthias Zepper of [NGI Sweden](https://ngisweden.scilifelab.se/) for reporting this to the crates.io team!",
"id": "GHSA-xp79-9mxw-878j",
"modified": "2026-02-12T22:10:23Z",
"published": "2026-02-12T22:10:23Z",
"references": [
{
"type": "WEB",
"url": "https://rustsec.org/advisories/RUSTSEC-2025-0150.html"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "`finch-rst` was removed from crates.io for malicious code"
}
GHSA-XR3G-4GG5-W3WQ
Vulnerability from github – Published: 2020-09-03 17:06 – Updated: 2021-10-01 21:00All versions of this package contained malware. The package was designed to find and exfiltrate cryptocurrency wallets.
Recommendation
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer.
The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "degbu"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:57:39Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of this package contained malware. The package was designed to find and exfiltrate cryptocurrency wallets.\n\n\n## Recommendation\n\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer.\n\nThe package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.",
"id": "GHSA-xr3g-4gg5-w3wq",
"modified": "2021-10-01T21:00:58Z",
"published": "2020-09-03T17:06:14Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1393"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Malicious Package in degbu"
}
GHSA-XRRG-WFWC-C7R3
Vulnerability from github – Published: 2020-09-04 15:33 – Updated: 2021-10-01 20:37All versions of this package contained malware. The package was designed to find and exfiltrate cryptocurrency wallets.
Recommendation
Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer.
The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "bictoin-ops"
},
"ranges": [
{
"events": [
{
"introduced": "0.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-506"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T18:56:08Z",
"nvd_published_at": null,
"severity": "CRITICAL"
},
"details": "All versions of this package contained malware. The package was designed to find and exfiltrate cryptocurrency wallets.\n\n\n## Recommendation\n\nAny computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer.\n\nThe package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.",
"id": "GHSA-xrrg-wfwc-c7r3",
"modified": "2021-10-01T20:37:47Z",
"published": "2020-09-04T15:33:52Z",
"references": [
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1354"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "Malicious Package in bictoin-ops"
}
Mitigation
Remove the malicious code and start an effort to ensure that no more malicious code exists. This may require a detailed review of all code, as it is possible to hide a serious attack in only one or two lines of code. These lines may be located almost anywhere in an application and may have been intentionally obfuscated by the attacker.
CAPEC-442: Infected Software
An adversary adds malicious logic, often in the form of a computer virus, to otherwise benign software. This logic is often hidden from the user of the software and works behind the scenes to achieve negative impacts. Many times, the malicious logic is inserted into empty space between legitimate code, and is then called when the software is executed. This pattern of attack focuses on software already fielded and used in operation as opposed to software that is still under development and part of the supply chain.
CAPEC-448: Embed Virus into DLL
An adversary tampers with a DLL and embeds a computer virus into gaps between legitimate machine instructions. These gaps may be the result of compiler optimizations that pad memory blocks for performance gains. The embedded virus then attempts to infect any machine which interfaces with the product, and possibly steal private data or eavesdrop.
CAPEC-636: Hiding Malicious Data or Code within Files
Files on various operating systems can have a complex format which allows for the storage of other data, in addition to its contents. Often this is metadata about the file, such as a cached thumbnail for an image file. Unless utilities are invoked in a particular way, this data is not visible during the normal use of the file. It is possible for an attacker to store malicious data or code using these facilities, which would be difficult to discover.