Skip to main content

Malicious code in @hrmony/cdk-constructs (npm)

0
Critical
Published: 09/29/2026 (09/29/2026, 16:33:26 UTC)
Source: GCVE Database
Product: @hrmony/cdk-constructs

Description

The npm package @hrmony/cdk-constructs contains malicious code that executes immediately upon import or require. It harvests AWS EC2 instance metadata, including IAM role credentials, environment variables, and Kubernetes secrets, then exfiltrates this sensitive information to a hardcoded external server. The package is a typosquatting attempt targeting developers seeking legitimate AWS CDK constructs under the @harmony scope. It also installs an additional attacker-controlled dependency. Systems with this package installed should be considered fully compromised, and all secrets must be rotated immediately.

Affected software

npmghsa
@hrmony/cdk-constructs
Affected versions
=5.3.5

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/29/2026, 21:25:43 UTC

Technical Analysis

The @hrmony/cdk-constructs npm package executes top-level asynchronous code on import that collects sensitive data from the host environment. This includes AWS EC2 instance metadata via IMDSv2, IAM role security credentials, environment variables, and Kubernetes service account tokens and secrets. The collected data is serialized and sent as JSON to a hardcoded external endpoint controlled by the attacker. The package name is a deliberate typo of the legitimate @harmony scope, indicating a typosquatting attack. It also declares a runtime dependency on another attacker-controlled package, @hrmony/kit-5, which is installed alongside it. This behavior results in full compromise of any system running this package.

Potential Impact

Any system with this package installed is fully compromised, as the attacker gains access to sensitive AWS credentials, environment variables, and Kubernetes secrets. This enables unauthorized access to cloud resources and potentially other systems. The compromise extends beyond the package itself, as the attacker may have deployed additional malicious software. Immediate secret rotation is required to prevent further unauthorized access.

Mitigation Recommendations

Remove the @hrmony/cdk-constructs package immediately from all affected systems. Rotate all AWS IAM credentials, environment secrets, and Kubernetes tokens from a secure, uncompromised environment. Treat any system that had this package installed as fully compromised and conduct a thorough security review. There is no official patch or fix available; remediation relies on removal and secret rotation.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-17258
Osv Schema Version
1.7.4
Aliases
["GHSA-h9qw-wcm3-qrr8"]
Ecosystems
["npm"]

Threat ID: 6abc27d5680226ef6846f97e

Added to database: 09/29/2026, 21:04:21 UTC

Last enriched: 09/29/2026, 21:25:43 UTC

Last updated: 09/30/2026, 03:14:40 UTC

Views: 9

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses