# Malicious npm package embeds prompt aimed at fooling AI-based security scanners

- ID: malicious-npm-package-embeds-prompt-aimed-2025-12
- Reported: 2025-12-01
- Researcher: unknown
- Organization: Infosecurity Magazine (reporting Koi Security research)
- AI role: ai_agent_or_mcp_as_target (Agent / MCP as target)
- Confidence in AI involvement: not assessed
- Research / borderline: false
- Last reviewed: not assessed
- Entry page: https://openattacks.ai/attacks/malicious-npm-package-embeds-prompt-aimed-2025-12/
- Entry JSON: https://openattacks.ai/api/attacks/malicious-npm-package-embeds-prompt-aimed-2025-12.json
- Browse title: Malicious npm package embeds prompt aimed at fooling AI-based security scanners
- Editorial summary: The typosquat eslint-plugin-unicorn-ts-2 stole environment secrets via a postinstall hook and carried an inert string instructing AI reviewers to treat the code as legitimate.
- Evidence class (catalog annotation): Not classified
- Source-stated target environments: Not specified
- Stage hunts and conditional defenses: https://openattacks.ai/api/defenses/malicious-npm-package-embeds-prompt-aimed-2025-12.json

## Technique
The typosquat eslint-plugin-unicorn-ts-2 stole environment secrets via a postinstall hook and carried an inert string instructing AI reviewers to treat the code as legitimate.

## Stack relevance (editorial)
Assessment: not\_assessed. No reviewed applicability annotation is available. Product mentions do not establish victim conditions.
A product mention alone is not a victim-side applicability mapping. Selection does not verify affected versions, permissions or compromise.

## Initial access
unknown

## AI tooling and models
- LLM-based package and code security scanners

## Other tooling
- unknown

## Victims and sectors
Technology and AI companies

## Target geography
- unknown
Target geography was not captured by the Notion feed. Actor attribution is not used as a victim location.

## Attribution
npm user hamburgerisland

## Scale and metrics
unknown

## Attack flow
Summary diagram derived from entry fields; a detailed sequence has not been supplied.
### entry: Reported initial access [unknown]
unknown
Evidence: https://infosecurity-magazine.com/news/malware-ai-detection-npm-package ; https://thehackernews.com/2025/12/malicious-npm-package-uses-hidden.html

### activity: Reported activity [execution]
The typosquat eslint-plugin-unicorn-ts-2 stole environment secrets via a postinstall hook and carried an inert string instructing AI reviewers to treat the code as legitimate.
Evidence: https://infosecurity-magazine.com/news/malware-ai-detection-npm-package ; https://thehackernews.com/2025/12/malicious-npm-package-uses-hidden.html

### ai: AI involvement [ai]
LLM-based package and code security scanners
Evidence: https://infosecurity-magazine.com/news/malware-ai-detection-npm-package ; https://thehackernews.com/2025/12/malicious-npm-package-uses-hidden.html

Connections:
- entry -> activity
- ai -> activity (AI context)

## Stage defense and hunting recommendations
Editorial recommendations, not validated coverage. Source-controlled query starters are drafts. Custom-schema examples require telemetry collection and field mapping; absence of a mapping means not assessed. MagicSword policy opportunities require managed Windows scope and enforcement.
### entry: Stage hunt not mapped yet
- Visibility: Not assessed
- Query origin: catalog_authored; status: not_assessed; log scope: gap
- Hunt hypothesis: A stage-specific hunt has not been reviewed for this part of the source account.
- Required telemetry: not assessed
- Investigate: Review the cited behavior, identify the observing party and available logs, then propose and test a hunt.
- Limitation: An unmapped stage does not mean it is undetectable or that no behavior occurred. It means this catalog has not supplied a reviewed hunt for it.
- No direct MagicSword prevention claim is recorded for this stage.

### activity: Stage hunt not mapped yet
- Visibility: Not assessed
- Query origin: catalog_authored; status: not_assessed; log scope: gap
- Hunt hypothesis: A stage-specific hunt has not been reviewed for this part of the source account.
- Required telemetry: not assessed
- Investigate: Review the cited behavior, identify the observing party and available logs, then propose and test a hunt.
- Limitation: An unmapped stage does not mean it is undetectable or that no behavior occurred. It means this catalog has not supplied a reviewed hunt for it.
- No direct MagicSword prevention claim is recorded for this stage.

### ai: Stage hunt not mapped yet
- Visibility: Not assessed
- Query origin: catalog_authored; status: not_assessed; log scope: gap
- Hunt hypothesis: A stage-specific hunt has not been reviewed for this part of the source account.
- Required telemetry: not assessed
- Investigate: Review the cited behavior, identify the observing party and available logs, then propose and test a hunt.
- Limitation: An unmapped stage does not mean it is undetectable or that no behavior occurred. It means this catalog has not supplied a reviewed hunt for it.
- No direct MagicSword prevention claim is recorded for this stage.


## MITRE ATLAS
Mappings are catalog annotations based on described behavior, not assignments or endorsements by MITRE.
No source-backed mapping is currently recorded.

## Defensive notes
unknown

## Sources
- https://infosecurity-magazine.com/news/malware-ai-detection-npm-package
- https://thehackernews.com/2025/12/malicious-npm-package-uses-hidden.html

## Source notes
Imported from the AI Threat Watch Notion feed (an automated daily scan); not yet editorially reviewed. Feed severity: Medium. Feed novelty: New TTP.
