Malicious code in @hrmony/middlewares (npm)
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.
AI Analysis
Technical Summary
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.
Mitigation Recommendations
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.
Malicious code in @hrmony/middlewares (npm)
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
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
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.