TL;DR: Malicious open-source packages are now being used as real malware that can execute on install, steal credentials, and compromise CI/CD workflows before SAST or SCA scanners run, according to Checkmarx. The operating assumption that package trust is safer than package control is no longer reliable.
At a glance
What this is: This analysis says malicious open-source packages are functioning as active malware at install time, bypassing traditional AppSec controls and creating risk across developer, pipeline, and production environments.
Why it matters: It matters because IAM, NHI, and AppSec teams have to treat package ingestion as a trust decision, not just a code-quality check, or credentials and build access remain exposed before controls can react.
By the numbers:
- 67% of respondents said half or more of their application code consists of open-source software.
- Only 49% said they have any protection in place against malicious packages.
Context
Malicious open-source packages are a supply chain problem with an identity consequence. The core issue is not just that unsafe code enters the build, but that package managers, developer workstations, and CI/CD systems often treat package ingestion as trusted by default. That creates a gap between how software is introduced and when controls are applied.
For identity and access teams, the risk is that these packages can touch secrets, tokens, and privileged build paths before conventional AppSec tooling sees them. In practice, that means machine credentials and production access can be exposed by a trust decision made at install time, not by a later vulnerability scan.
This pattern is already typical in modular development environments that depend heavily on third-party packages and automated pipelines.
Key questions
Q: What breaks when malicious package installs are allowed to execute code by default?
A: Malicious packages can run before review, harvest tokens from the local environment, and create persistence through repositories or automation paths. The break point is not just endpoint compromise. It is the collapse of trust between dependency installation and identity governance, because secrets become reachable during package acceptance rather than after deployment.
A: They target trusted workflows and sensitive identity material at the same time. A single malicious package can capture sudo passwords, cloud provider configs, SSH keys, browser sessions, and developer tokens, then move data through hidden infrastructure. That combination turns one compromise into broad identity exposure, increases lateral movement potential, and makes post-incident scoping harder for security teams.
Q: What do security teams get wrong when they assume open-source security is automatic?
A: Teams often assume open source is secure by default, but security still depends on governance, review, and community engagement. Code visibility helps, yet it does not replace patch management, testing, release discipline, or threat modeling. Without those controls, exposed code can still contain vulnerabilities, and the organisation may gain transparency without gaining real risk reduction.
Q: How should organisations govern malicious package risk across software delivery?
A: They should treat dependency ingestion as a governed control point, with clear ownership across AppSec, platform engineering, and identity teams. Package approval, registry policy, and build credential protection all need to operate together because the threat crosses developer workstations, CI/CD systems, and production paths.
Technical breakdown
Why malicious packages bypass SAST and SCA
Traditional SAST and SCA assume the risky code is either already present in source or can be detected after dependency resolution. Malicious open-source packages break that assumption because the package itself is the payload and can execute during install, before the application is scanned or even written to make use of it. That timing matters. If a package manager trusts the repository and the install event, the attack lands inside the toolchain rather than in the application codebase.
Practical implication: Shift control left to package admission, not just code scanning.
How malicious packages reach secrets and build systems
Developer laptops and CI/CD runners often hold cached tokens, cloud credentials, signing material, and access to private registries. A malicious package that runs at install time can search those environments, harvest credentials, and pivot into downstream systems. The danger is amplified when build automation can reach production-adjacent assets and when identity boundaries between developer, pipeline, and workload contexts are weakly separated. In NHI terms, the package exploit is often an entry point into machine credentials and service trust.
Practical implication: Treat developer and pipeline credentials as high-value NHI assets with separate controls.
Why package trust becomes a governance problem
Package managers are usually optimized for convenience and velocity, not adversarial validation. That creates a governance gap: organisations approve dependency adoption but do not continuously verify whether the package is benign at the moment of install. The result is a standing trust assumption that attackers can abuse repeatedly across ecosystems. Once malicious packages are present, registry controls, wrappers, and real-time checks become part of identity governance for software supply chains, because they determine who or what is allowed to execute inside build and delivery paths.
Practical implication: Govern package admission with the same discipline used for privileged access.
Threat narrative
Attacker objective: The attacker wants to turn trusted package installation into a credential and pipeline compromise path that reaches downstream environments before detection.
- Entry occurs when a developer or build system installs a malicious open-source package that has been intentionally embedded with malware.
- Credential harvesting follows as the package executes automatically and searches for tokens, secrets, or cached credentials in the local or pipeline environment.
- Escalation and impact occur when stolen credentials or backdoor access are used to compromise build pipelines, exfiltrate sensitive data, or reach production-adjacent systems.
Breaches seen in the wild
- Checkmarx KICS supply chain attack 2026: Credentials stolen via Trivy let attackers poison Checkmarx KICS Docker images, VS Code extensions and Actions to steal developer secrets.
- LiteLLM PyPI package breach: LiteLLM PyPI supply chain attack, credentials stolen from users.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Package trust is now a security control, not a developer convenience. Malicious open-source packages show that dependency acceptance is an execution decision with identity consequences, not just a build-time preference. Once a package can run code during install, the trust boundary moves from the application to the supply chain entry point. Practitioners should treat package admission as part of access governance for software delivery.
Malicious package defense is a machine-identity problem as much as an AppSec problem. These attacks succeed by reaching secrets, tokens, and pipeline credentials before conventional scanning runs. That means the real control objective is not only detecting bad code, but protecting the identities that build systems use to authenticate, sign, and deploy. The boundary between AppSec and NHI governance is now operational, not theoretical.
Install-time inspection closes a gap that post-install scanning cannot. The article’s core failure mode is timing: SAST and SCA often arrive after the malicious package has already executed. That makes pre-install verification, registry gating, and runtime admission checks the decisive controls. For practitioners, the lesson is to move trust decisions to the point of ingestion, where they can still prevent execution.
Open-source dependence creates an exposure density problem. When most application code depends on OSS, the number of potential entry points into build and developer environments rises sharply. The named concept here is dependency execution risk: any dependency that can run during install can also become a vehicle for secret theft or pipeline compromise. The practical response is to govern dependency ingress as a high-frequency control domain, not a periodic review exercise.
Real-time package validation belongs in the same conversation as least privilege. If build agents and developer tools can fetch and execute packages freely, then access reviews alone cannot contain the blast radius. The control that matters is whether untrusted packages are allowed to execute inside environments that already hold privileged credentials. Teams should align package controls with the same seriousness they apply to privileged session governance.
From our research library:
- 73% of vaults are misconfigured, leading to unauthorised access and exposure of sensitive data, according to the Ultimate Guide to NHIs.
- Only 44% of developers are reported to follow security best practices for secrets management, exposing a significant developer behaviour gap, according to the State of Secrets in AppSec.
- Read next: AI Supply Chain Security and AI-BOM Guide
What this signals
Dependency execution risk: the key governance gap is not whether a package has known vulnerabilities, but whether it can execute before inspection and reach privileged build contexts. That shifts the control problem from vulnerability management to package admission, registry policy, and environment isolation.
For identity teams, the more important question is where package install paths intersect with secrets, tokens, and signing keys. If those credentials are available to developer tools or CI runners, malicious packages can turn routine dependency installs into machine-identity compromise.
Open-source-heavy development models will keep expanding the number of trust decisions made per build. Practitioners should expect package screening, real-time admission checks, and credential isolation to become baseline controls rather than optional hardening.
For practitioners
- Implement pre-install package screening Block package execution until automated checks verify the dependency against a malicious package database before download or install.
- Harden artifact registries and mirrors Use registry plugins and repository controls to stop known malicious packages from entering private repositories or being reinstalled from them.
- Separate developer and pipeline credentials Reduce shared exposure by isolating tokens, cloud credentials, and signing material from environments that can execute third-party packages.
- Add fast API-based CI/CD checks Insert low-latency package checks into build pipelines so suspicious dependencies are blocked in seconds without slowing delivery.
- Continuously monitor installed dependencies Reassess packages already present in environments, because a dependency can later be identified as malicious after initial installation.
Key takeaways
- Malicious open-source packages are not dormant defects, they are active malware that can execute during install and reach privileged environments before standard scanners respond.
- The exposure is amplified by heavy OSS reliance and weak protection coverage, with 67% of respondents saying half or more of their code is open source and only 49% reporting any protection against malicious packages.
- The practical control shift is toward pre-install screening, registry gating, and tighter protection for developer and CI/CD credentials, because post-install scanning arrives too late.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10, MITRE ATT&CK and OWASP API Security Top 10 address the attack and risk surface, while CIS Controls v8 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | Malicious packages are stealing secrets from developer and pipeline environments. |
| NHI-07 — Long-Lived Secrets | The article centers on credentials exposed in environments that malicious packages can abuse at install time. | |
| Recommendation — Scan package ingress paths for leaked secrets and block dependencies that can reach them. Reduce exposure by shortening the lifespan of build and developer credentials. | ||
| MITRE ATT&CK | TA0006;TA0010 — Credential Access; Exfiltration | The attack pattern involves stealing credentials and exfiltrating data from trusted environments. |
| Recommendation — Map malicious package behaviour to credential access and exfiltration techniques in detection content. | ||
| OWASP API Security Top 10 | API2 — Broken Authentication | The package trust model fails when installs are accepted without validating the authenticity of code provenance. |
| Recommendation — Validate package authenticity before execution and reject installs that cannot be verified. | ||
| CIS Controls v8 | CIS-5 — Account Management | The article’s risk is amplified by unmanaged credentials in developer and CI environments. |
| Recommendation — Inventory and revoke unnecessary accounts and credentials in build and developer systems. | ||
Key terms
- Malicious open-source package: A malicious open-source package is a dependency that contains intentional malware rather than an accidental flaw. It may run automatically during installation, import, or post-install processing, allowing attackers to steal secrets, alter build output, or create persistence inside development workflows.
- Package Admission: Package admission is the decision point where tooling or policy determines whether a dependency is allowed into a build or deployment workflow. In mature programmes, this is where trust is enforced, exceptions are recorded, and automation is constrained by policy.
- Dependency Execution: Dependency execution is the running of code during software installation or build time, often through package scripts or embedded loaders. It matters because malicious behavior can start before an application ever launches, making build pipelines, developer systems, and package managers part of the attack surface.
- Developer Environment Secrets: Developer environment secrets are credentials, tokens, certificates, and keys stored or cached in laptops, IDEs, runners, and build tools. They are high-value NHI assets because malicious packages can harvest them quickly once execution is granted inside those environments.
Deepen your knowledge
The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It helps practitioners connect identity controls to the software delivery risks that malicious packages expose.
Published by the NHIMG editorial team on August 2, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org