Join our Newsletter — 33% off our NHI Course
Home› Glossary› Cyber Security› Wrapper Package
Cyber Security

Wrapper Package

← Back to Glossary
By NHI Mgmt Group Updated November 5, 2026 Domain: Cyber Security

A wrapper package is a benign-looking package that imitates a legitimate dependency and then includes additional transitive dependencies. Attackers use it to hide malicious code one layer deeper in the graph, making source review and name-based trust far less reliable.

What a wrapper package is and why it works

A wrapper package is deceptive because it borrows the shape of a trusted dependency while quietly adding extra transitive dependencies beneath it. That makes simple trust checks, name matching and cursory package review much less effective, especially when the malicious payload is not in the top-level package you expected to inspect.

How wrapper packages are used in supply-chain attacks

In practice, the wrapper package acts as a camouflage layer. The package name, description or surface behaviour can look normal while the dangerous code sits deeper in the dependency tree, where it may only be pulled in after installation or during build-time resolution. This is one reason supply-chain attackers favour dependency confusion, typo-squatting and package impersonation: the first impression is designed to pass.

For a real-world example of this pattern, see the LiteLLM PyPI package breach, which shows how a package can appear legitimate while exposing users to downstream compromise.

Why wrapper packages are dangerous

The main danger is that the visible package is not the whole threat. Reviewers may approve the wrapper because its top-level files look harmless, yet the install graph can still introduce hostile code, unexpected runtime behaviour or additional dependencies that expand the attack surface. That hidden layering weakens both human review and automated allow-listing based only on package names.

Wrapper packages also erode provenance trust. If an organisation assumes that a familiar name or repository identity implies safety, the attacker only needs one accepted wrapper to reintroduce malicious code into an otherwise controlled dependency chain.

How organisations detect and reduce exposure

Defence starts with knowing exactly what is installed, where it came from and what it pulls in transitively. Software bills of materials, dependency lockfiles, registry inspection and provenance checks are all useful because they reveal the extra edges that a wrapper package relies on. Repository policy should treat transitive additions as first-class review items, not as implementation noise.

Open source supply-chain controls and guidance from the OpenSSF are especially relevant here because wrapper packages exploit the gaps between package trust, dependency resolution and release integrity. Organisations should also use dependency scanning, suspicious-name monitoring and build-time validation to catch packages that introduce unexpected transitive content.

Risk and Threat Considerations

Wrapper packages create a supply-chain concealment problem: the package a developer sees is not necessarily the code that executes, and the malicious layer may only appear after dependency resolution or installation. That makes source review, package-name trust and basic dependency approval materially less reliable.

Failure mechanism: An attacker publishes or compromises a benign-looking wrapper, then uses transitive dependencies or install-time behaviour to smuggle in malicious code, evading shallow review and name-based trust controls.

Impact: The result can be credential theft, build compromise, malware execution or persistent downstream contamination of the software supply chain, especially when the wrapper is adopted into automated build and deployment paths.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

SLSA, CIS Controls v8 and OWASP ASVS set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
SLSASupply-chain integrityWrapper packages undermine artifact provenance and dependency integrity.
Recommendation — Verify build provenance and reject artifacts that introduce unreviewed dependency paths.
CIS Controls v8CIS-16 — Application Software SecurityWrapper packages are a software supply-chain and dependency integrity issue.
Recommendation — Inspect and control third-party dependencies before they enter production builds.
OWASP ASVSV15 — Secure Coding and ArchitectureSupply-chain-dependent code paths belong in secure architecture and dependency review.
Recommendation — Treat unexpected dependency additions as a secure-architecture review failure.

Practitioner Guidance

Why practitioners should care: Wrapper packages are a governance problem as much as a technical one, because approval based on package identity alone is no longer sufficient. Teams should require review of the dependency tree and provenance, not just the top-level artifact.

What to watch for: Pay close attention to packages that introduce unexpected transitive dependencies, mimic established naming patterns or change dependency depth without a clear functional reason. Those are strong signals that the package deserves deeper scrutiny before it enters a trusted build path.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 5, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org