GHSA-7hx8-2rxv-66xv
NoneCVSS
—
EPSS
—
Published
Sep 3, 2020
CISA due date
—
Cloudanix analysis
Some web services built with this software could be knocked offline by specially crafted traffic until the vulnerable component is updated or protected.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Web Framework
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
This advisory describes a denial-of-service condition in hapi, a Node.js web application framework. A vulnerable hapi-based service can be driven into excessive resource consumption or request-processing failure by specially crafted input or traffic, reducing availability of the application process. The primary technical impact is service disruption rather than data theft or code execution.
Why it matters to the business
Successful exploitation can make web applications or APIs built on vulnerable hapi versions slow, unstable, or unavailable. For organizations that rely on these services for customer portals, internal workflows, integrations, or revenue-generating APIs, this can cause outages, failed transactions, operational delays, support burden, and potential SLA impact. The advisory is older, is not listed in CISA KEV, and has no known exploit maturity in the supplied data, so urgency is generally driven by whether vulnerable hapi versions remain exposed on internet-facing or business-critical services.
How an attack unfolds
An attacker first identifies an application or API built with an affected hapi version. They then send crafted HTTP requests or request patterns that trigger the vulnerable denial-of-service behavior in hapi’s request handling path. If the service does not have compensating protections such as strict input limits, rate limiting, timeouts, process isolation, or autoscaling, the application process may consume excessive CPU, memory, or event-loop time, or otherwise become unable to process legitimate requests. The attacker can repeat the request pattern to prolong service degradation or outage.
How to fix it
Upgrade hapi and related framework dependencies to a version that contains the denial-of-service fix. Because no affected product or fixed-version list was provided in the input, validate against the official hapi advisory and package metadata for the exact safe version applicable to the deployed major release. Rebuild and redeploy applications after updating lockfiles. Where immediate upgrade is not possible, reduce exposure by placing services behind a reverse proxy or WAF, enforcing request size limits, header limits, body parsing limits, connection and idle timeouts, rate limits, and concurrency limits. Ensure Node.js process managers restart failed workers and that horizontal scaling or circuit breakers prevent one service instance from taking down the full application.
How to confirm the fix worked
Confirm that deployed applications no longer include vulnerable hapi versions by checking package manifests and lockfiles such as package.json, package-lock.json, yarn.lock, or pnpm-lock.yaml, and by running dependency scanners such as npm audit, GitHub Dependabot, Snyk, OSV-Scanner, or equivalent SCA tooling. Validate container images and deployed artifacts, not only source repositories. Perform controlled negative testing against staging services to confirm malformed or high-volume requests are rejected, timed out, or rate-limited without excessive CPU, memory growth, process crashes, or event-loop starvation. Review runtime telemetry after deployment to confirm error rates, restart counts, latency, memory, and CPU remain stable under representative load.
Typical attack path
- Identify internet-facing Node.js services or APIs likely using hapi.
- Fingerprint application behavior, headers, errors, package metadata, or dependency disclosures to infer a vulnerable hapi version.
- Send crafted HTTP requests designed to trigger the vulnerable denial-of-service condition.
- Repeat or parallelize requests to exhaust application resources or keep the Node.js event loop busy.
- Observe degraded response times, failed requests, process restarts, or service unavailability.
How to detect it
To determine whether exploitation may already have occurred, review web server, reverse proxy, WAF, load balancer, CDN, and application logs for unusual bursts of requests that correlate with service degradation, high latency, memory growth, CPU saturation, Node.js process restarts, or 502/503/504 responses. Focus on repeated requests from the same source IPs or user agents, malformed paths, abnormal query strings, oversized headers or bodies, unusual content types, and requests that consistently precede crashes or event-loop lag. Examine process supervisor logs such as PM2, systemd, Docker, Kubernetes, or platform runtime logs for Node.js worker restarts, out-of-memory kills, uncaught exceptions, timeout storms, or health-check failures. Because the supplied advisory data does not include a public exploit signature or known threat actor activity, detection should be behavior-based and correlated across request telemetry and availability metrics rather than relying on a single fixed indicator.
- HTTP 502 responses correlated with Node.js application restart events
- HTTP 503 responses correlated with Node.js application restart events
- HTTP 504 responses correlated with upstream timeout events
- upstream timed out
- connect() failed
- ECONNRESET
- ETIMEDOUT
- JavaScript heap out of memory
- FATAL ERROR: Ineffective mark-compacts near heap limit
- Allocation failed - JavaScript heap out of memory
- ENOMEM
- process exited with code 137
- OOMKilled
- CrashLoopBackOff
- PM2 | App [
- exited with code
- systemd: Main process exited
- Uncaught exception
- UnhandledPromiseRejectionWarning
- Event loop lag
- request entity too large
- Payload content length greater than maximum allowed
- socket hang up
What your security team should do
- Inventory Node.js applications and APIs that use hapi, prioritizing internet-facing and business-critical services.
- Use software composition analysis to identify vulnerable hapi versions in source repositories, container images, and deployed artifacts.
- Upgrade hapi to a fixed version verified from the official advisory for the applicable release line, then regenerate and commit dependency lockfiles.
- Apply compensating controls for any service that cannot be upgraded immediately: WAF or reverse proxy filtering, rate limiting, request size limits, aggressive timeouts, and autoscaling safeguards.
- Add availability-focused monitoring for affected services, including high latency, elevated 4xx/5xx responses, event-loop lag, memory growth, CPU saturation, and process restarts.
- Review historical access logs and application telemetry for repeated malformed request patterns, traffic spikes from a small number of sources, and correlated service instability.
- Treat findings as lower priority than actively exploited KEV vulnerabilities unless the vulnerable service is internet-facing, unauthenticated, or operationally critical.
The record
Denial of Service in hapi
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| npm | hapi | 0 | No fix |
| npm | hapi | 0.0.0 | No fix |