Skip to main content

Malicious code in @hrmony/middlewares (npm)

0
Critical
Published: 09/29/2026 (09/29/2026, 16:32:23 UTC)
Source: GCVE Database
Product: @hrmony/middlewares

Description

The npm package '@hrmony/middlewares' is a malicious package designed to exfiltrate AWS instance metadata, IAM credentials, environment variables, and Kubernetes secrets to a hardcoded external server. It impersonates the legitimate '@harmony/middlewares' package by using a similar name. Installing or running this package compromises the host, potentially exposing all stored secrets and keys.

Affected software

npmghsa
@hrmony/middlewares
Affected versions
=3.99.0

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:09 UTC

Technical Analysis

The '@hrmony/middlewares' npm package performs unauthorized data exfiltration upon module load. It queries the AWS instance metadata service (IMDSv2) to collect instance identity, region, network interfaces, and IAM role temporary credentials. It also serializes all environment variables and recursively reads Kubernetes service-account secret files. This aggregated sensitive information is sent via POST to a hardcoded external endpoint 'https://hrnmn.dd.h4x.tv/save_instance_info_from_pkge_hrmony_middlewares'. The package provides no legitimate functionality and is solely intended for credential and secret theft. The package name and exfiltration domain mimic the legitimate '@harmony/middlewares' package and its naming pattern to deceive users.

Potential Impact

Any system with this package installed or running is considered fully compromised. Attackers gain access to AWS credentials, environment variables, and Kubernetes secrets, enabling unauthorized access and control over cloud resources and potentially the entire host environment. All secrets and keys on the compromised system should be considered exposed and rotated immediately. Removing the package alone may not eliminate all malicious artifacts or backdoors.

Defensive Guidance

Remove the '@hrmony/middlewares' package immediately from all affected systems. Rotate all AWS credentials, environment variables, and Kubernetes secrets that may have been exposed, using a secure and uncompromised environment. Conduct a thorough investigation for additional persistence mechanisms or backdoors, as the system may be fully compromised. There is no official patch or fix since this is a malicious package; prevention involves avoiding installation of this package and verifying package authenticity before use.

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-17269
Osv Schema Version
1.7.4
Aliases
["GHSA-5cwm-5j38-r753"]
Ecosystems
["npm"]

Threat ID: 6abc27d5680226ef6846f977

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

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

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

Views: 11

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