What is CWE-506?
The product contains code that appears to be malicious in nature.
Malicious flaws have acquired colorful names, including Trojan horse, trapdoor, timebomb, and logic-bomb. A developer might insert malicious code with the intent to subvert the security of a product or its host system at some time in the future. It generally refers to a program that performs a useful service but exploits rights of the program's user in a way the user does not intend.
CWE-506 is a class-level weakness in MITRE’s Common Weakness Enumeration. Applicable platforms: Language: Not Language-Specific.
Source: MITRE CWE (CWE-506 definition, reproduced verbatim). Counts and linkage below are Threadlinqs data.
Consequences
- Confidentiality, Integrity, Availability — Execute Unauthorized Code or Commands
Source: MITRE CWE, common consequences.
How CWE-506 is exploited in the wild
Threadlinqs maps 13 CVEs to CWE-506, published between 2024-03-29 and 2026-10-19. 5 are listed in CISA’s Known Exploited Vulnerabilities catalog, the authoritative record of exploitation in the wild, and 2 are tied to ransomware campaigns. By CVSS v3 severity the set splits into 7 critical, 4 high, 1 medium. The highest EPSS score in the set is 85.9% (CVE-2024-3094), the modelled probability of exploitation in the next 30 days. 424 tracked threats reference CWE-506 directly or through a CVE it covers; the most recent is “Malicious npm package indexed-btree evades install-script restrictions via BTree.prototype.set runtime trigger and Sepolia smart-contract C2” (2026-11-19). Affected products concentrate in @tanstack (1), Amazon (1), Aquasec (1), among 14 vendors in total.
Vulnerabilities (CVEs)
All 13 CVEs mapped to CWE-506, CISA KEV first, then by CVSS score.
- CVE-2026-48027 — CISA KEV · CVSS 9.8 critical · EPSS 1.3% · published 2026-05-27
- CVE-2026-45321 — CISA KEV · CVSS 9.6 critical · EPSS 1.0% · published 2026-05-12
- CVE-2026-33634 — CISA KEV · CVSS 8.8 high · EPSS 1.6% · published 2026-03-23
- CVE-2025-30066 — CISA KEV · CVSS 8.6 high · EPSS 72.0% · published 2025-03-15
- CVE-2025-30154 — CISA KEV · CVSS 8.6 high · EPSS 2.4% · published 2025-03-19
- CVE-2024-3094 — CVSS 10 critical · EPSS 85.9% · published 2024-03-29
- CVE-2026-66747 — CVSS 9.8 critical · EPSS 0.7% · published 2026-08-05
- CVE-2026-111862 — CVSS 9.8 critical · EPSS 0.6% · published 2026-10-19
- CVE-2026-97230 — CVSS 9.8 critical · EPSS 0.2% · published 2026-09-24
- CVE-2025-10894 — CVSS 9.6 critical · EPSS 0.5% · published 2025-09-24
- CVE-2026-67595 — CVSS 8.1 high · EPSS 0.4% · published 2026-07-29
- CVE-2025-8217 — CVSS 4 medium · EPSS 0.2% · published 2025-07-30
- CVE-2026-48161 — EPSS 0.4% · published 2026-08-10
Affected vendors
- @tanstack — 1 CVE
- Amazon — 1 CVE
- Aquasec — 1 CVE
- Litellm — 1 CVE
- Nx — 1 CVE
- RankMath — 1 CVE
- Red Hat — 1 CVE
- Reviewdog — 1 CVE
- Telnyx — 1 CVE
- Tj-actions — 1 CVE
- Tukaani — 1 CVE
- Zbtlink — 1 CVE
Threat activity
424 tracked threats cite CWE-506; the 25 most recent are listed.
- Malicious npm package indexed-btree evades install-script restrictions via BTree.prototype.set runtime trigger and Sepolia smart-contract C2HIGH
- Microsoft agent-framework PyPI package compromised with .pth credential stealer (versions 1.26.1, 1.26.2)HIGH
- Malicious GitHub Repositories Hijack AI Coding Agents (Claude Code, Cursor) via Poisoned Instruction Files to Steal Developer CredentialsHIGH
- GhostMap eBPF Rootkit Hides Malware Processes and Sockets in IronWorm (npm) and Atomic Arch (AUR) Supply Chain CampaignsHIGH
- Hidden in the Weights: Supply Chain Risk from Backdoored LoRA Models in Open-Weight AIMEDIUM
- Cursor Supply-Chain Compromise: Leaked Fireworks AI Key Leads to Backdoored Anthropic.claude-code Extension (2.1.312/2.1.313) in Cursor Marketplace CacheHIGH
- Sckit Supply Chain Worm Hits MemTensor npm & PyPI Packages (@memtensor/memos-cloud-openclaw-plugin, MemoryOS)HIGH
- TOPHIT: One-operator npm typosquat flood (@prime0 scope, 85 packages) co-hosted with GPU-cryptojacking C2HIGH
- wfx-loot: GitHub Actions CI secret stealer pushed to public repositories using stolen GitHub credentialsHIGH
- Software Supply Chain Attacks Weaponizing Trusted Developer Workflows (Shai-Hulud, Miasma, Hades, TeamPCP)HIGH
- Why SBOMs Are Failing to Stop Supply Chain Attacks: XZ Utils Backdoor (CVE-2024-3094) and Axios npm Compromise (March 2026) as Case StudiesMEDIUM
- Adform Supply-Chain Compromise: trackpoint-async.js Serving Crypto-Wallet Address StealerHIGH
- Malware and Credential Exposure in AI Agent Instruction Files (Skills, Hooks, MCP Configs) - Mitiga Skillgate ResearchHIGH
- Supply Chain Compromise Trends 2025-2026: TeamPCP (UNC6780) package poisoning, axios npm compromise (MIDNIGHT NEPTUNE / UNC1069), and mitigation guidanceHIGH
- Microsoft Research 'Lazarus' Technique: Backdooring AI Agents by Editing Fewer Than 10 Model Neurons (Model Supply-Chain Risk)MEDIUM
- AI Is Both Target and Tool for Threat Actors: AI-Involved Supply-Chain, Malware and Extortion Trends (Insikt Group, Jul 2025 - Jul 2026)HIGH
- Malicious npm package tw-pkgprobe-7731 targets developers integrating Twilio (credential harvesting)MEDIUM
- Malicious RubyGem strutil-core 1.0.1 Steals 51 Credential Types and Backdoors AI Coding Tools (testmetest / Miasma worm, Shai-Hulud descendant)HIGH
- GHAPPIER Loader: npm Supply-Chain Compromise of @dforge-core/dforge-mcp 0.2.21 Beside DPRK-Linked PolinRider CampaignHIGH
- Malicious @ethersphere/bee-js 13.3.0 npm Release and Swarm Desktop 0.56.2 Deliver SleepyDuck Ethereum C2 BackdoorCRITICAL
- Ethersphere bee-js 13.3.0 and Swarm Desktop 0.56.2 Supply-Chain Compromise Delivers Wallet-Stealing Malware and BackdoorsCRITICAL
- Backdoored ARTEX Docker Hub images (tomicdd/artex and clones) expose 62 consoles to unauthenticated root shell; CERT-In CIAD-2026-0058 flags AI-assisted actor Crafty FalconCRITICAL
- CWPdoor: Trojanized Control Web Panel cwpsrv binary backdoors Linux serversHIGH
- Supply Chain Attack Artifacts in GitHub Repositories and Developer Machines (Miasma, Shai-Hulud, ForceMemo, Megalodon, GhostAction, TeamPCP and others)HIGH
- PolinRider Loader Reappears in Hijacked npm Packages (12 malicious releases across 10 packages)HIGH
Mitigations
- Testing: 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.
Source: MITRE CWE, potential mitigations.
Detection methods (MITRE CWE)
- Manual Static Analysis - Binary or Bytecode (effectiveness: SOAR Partial): According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies Generated Code Inspection
- Dynamic Analysis with Manual Results Interpretation (effectiveness: SOAR Partial): According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: Automated Monitored Execution
- Manual Static Analysis - Source Code (effectiveness: SOAR Partial): According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: Manual Source Code Review (not inspections)
- Automated Static Analysis (effectiveness: SOAR Partial): According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: Origin Analysis
Source: MITRE CWE, detection methods. Threadlinqs detection rules for the threats above are Blue tier and higher.