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. 408 tracked threats reference CWE-506 directly or through a CVE it covers; the most recent is “Malicious npm package tw-pkgprobe-7731 targets developers integrating Twilio (credential harvesting)” (2026-11-10). 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
408 tracked threats cite CWE-506; the 25 most recent are listed.
- 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
- cPGuard Update Channel Hijacked to Backdoor Linux Servers and Collect Password Hashes (OPSSHIELD Supply-Chain Compromise)CRITICAL
- XCPE Android Set-Top Box Botnet: Videostrong Technology Firmware Supply-Chain Backdoor Disrupted by GoogleHIGH
- Compromised Injective SDK npm Package (@injectivelabs/sdk-ts 1.20.21) Exfiltrates Cryptocurrency Wallet KeysHIGH
- Malicious Anthropic.claude-code extension version 2.1.313 distributed via Cursor Extension Marketplace (SSH backdoor and persistence on macOS and Windows)HIGH
- Claude Code extension (anthropic.claude-code v2.1.313) on Open VSX poisoned with persistent SSH backdoorHIGH
- Hugging Face 'Load/Mine' Campaign: Malicious Qwen2 Model Repos Abuse trust_remote_code to Hijack GPUs for Pearl (PRL) Mining and Backdoor Xinference/GPUStack HostsHIGH
- Shai-Hulud Self-Propagating Supply Chain Malware Campaign Targeting NPM, GitHub Actions and Release PipelinesHIGH
- Mastra npm Packages Trojanized with Malicious easy-day-js Dependency (UNC1069)HIGH
- Malicious AGENTS.md / CLAUDE.md Files in Downloads Folder Trick AI Coding Agents (Codex, Claude Code) Into Installing MALFEX npm Malware (function-color, function-flag)MEDIUM
- Emperador Ransomware Group Claims 3.9GB Data Theft from AB InBev (Budweiser, Corona Maker) - Unverified $1M Bitcoin ExtortionMEDIUM
- LiteLLM Supply Chain Compromise (litellm 1.107.0) Targets AI Developer CredentialsCRITICAL
- Graphalgo Campaign Expands Upstream into Infrastructure as Code via Malicious Terraform Providers and Go ModulesHIGH
- CI/CD Runner Memory-Dump Credential Theft (CVE-2025-8217 technique): Runtime Security for AWS CodeBuild-Hosted GitHub Actions RunnersHIGH
- Malicious GitHub 'sol-live' Solidity interview project hides data-stealing backdoor in VS Code settingsHIGH
- Credential Layer Exposure: Secrets Sprawl and Shai-Hulud npm Supply Chain Credential Harvesting (GitGuardian)MEDIUM
- Developer credential exposure on dev machines: StepSecurity Dev Machine Guard credential-source inventory (context: TeamPCP stealer, Bitwarden CLI npm hijack, Shai-Hulud)MEDIUM
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.