CVE-2024-39702: n/a
In lj_str_hash.c in OpenResty 1.19.3.1 through 1.25.3.1, the string hashing function (used during string interning) allows HashDoS (Hash Denial of Service) attacks. An attacker could cause excessive resource usage during proxy operations via crafted requests, potentially leading to a denial of service with relatively few incoming requests. This vulnerability only exists in the OpenResty fork in the openresty/luajit2 GitHub repository. The LuaJIT/LuaJIT repository. is unaffected.
AI Analysis
Technical Summary
CVE-2024-39702 identifies a Hash Denial of Service (HashDoS) vulnerability in the string hashing function implemented in lj_str_hash.c within OpenResty versions 1.19.3.1 through 1.25.3.1. This function is responsible for string interning, a process that stores unique strings efficiently to optimize memory and performance. The vulnerability arises because the hashing algorithm can be manipulated by an attacker to produce excessive hash collisions. When the OpenResty proxy processes crafted requests containing such strings, the hash table operations degrade from average O(1) to worst-case O(n) complexity, causing significant CPU and memory consumption. This can lead to resource exhaustion and denial of service with relatively few malicious requests. Notably, this vulnerability is specific to the OpenResty fork of LuaJIT (openresty/luajit2) and does not affect the original LuaJIT repository. The CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H) indicates that the attack is network-based, requires high attack complexity, no privileges, and no user interaction, with impact limited to availability. No patches are currently linked, and no known exploits have been reported in the wild. The vulnerability is categorized under CWE-407 (Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')).
Potential Impact
The primary impact of CVE-2024-39702 is on the availability of systems running vulnerable OpenResty versions. Attackers can exploit the HashDoS vulnerability to cause excessive CPU and memory usage during proxy operations, leading to denial of service conditions. This can disrupt web services, degrade performance, and potentially cause outages. Organizations relying on OpenResty as a reverse proxy or web server component may experience service interruptions, affecting end-user access and business continuity. Since exploitation requires no authentication and can be triggered remotely, the attack surface is broad. However, the high attack complexity reduces the likelihood of widespread exploitation. The vulnerability does not affect confidentiality or integrity, limiting the impact to availability. Still, denial of service in critical infrastructure or high-traffic environments can have significant operational and reputational consequences.
Mitigation Recommendations
1. Monitor network traffic for unusual patterns indicative of hash collision attacks, such as repeated requests with similar string payloads causing high CPU usage. 2. Limit request rates and implement rate limiting or throttling on endpoints served by OpenResty to reduce the impact of crafted requests. 3. Deploy Web Application Firewalls (WAFs) with rules to detect and block suspicious request patterns targeting string hashing functions. 4. Isolate OpenResty proxy servers behind load balancers or reverse proxies that can absorb or filter malicious traffic. 5. Review and update OpenResty versions regularly; apply patches or updates from the OpenResty project as soon as they become available. 6. Consider temporary workarounds such as disabling or modifying features that heavily rely on string interning if feasible. 7. Conduct performance testing under simulated attack conditions to understand system behavior and prepare incident response plans. 8. Engage with the OpenResty community or maintainers for early access to fixes or mitigation guidance.
Affected Countries
United States, China, Germany, Japan, South Korea, United Kingdom, France, India, Brazil, Russia
CVE-2024-39702: n/a
Description
In lj_str_hash.c in OpenResty 1.19.3.1 through 1.25.3.1, the string hashing function (used during string interning) allows HashDoS (Hash Denial of Service) attacks. An attacker could cause excessive resource usage during proxy operations via crafted requests, potentially leading to a denial of service with relatively few incoming requests. This vulnerability only exists in the OpenResty fork in the openresty/luajit2 GitHub repository. The LuaJIT/LuaJIT repository. is unaffected.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2024-39702 identifies a Hash Denial of Service (HashDoS) vulnerability in the string hashing function implemented in lj_str_hash.c within OpenResty versions 1.19.3.1 through 1.25.3.1. This function is responsible for string interning, a process that stores unique strings efficiently to optimize memory and performance. The vulnerability arises because the hashing algorithm can be manipulated by an attacker to produce excessive hash collisions. When the OpenResty proxy processes crafted requests containing such strings, the hash table operations degrade from average O(1) to worst-case O(n) complexity, causing significant CPU and memory consumption. This can lead to resource exhaustion and denial of service with relatively few malicious requests. Notably, this vulnerability is specific to the OpenResty fork of LuaJIT (openresty/luajit2) and does not affect the original LuaJIT repository. The CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H) indicates that the attack is network-based, requires high attack complexity, no privileges, and no user interaction, with impact limited to availability. No patches are currently linked, and no known exploits have been reported in the wild. The vulnerability is categorized under CWE-407 (Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')).
Potential Impact
The primary impact of CVE-2024-39702 is on the availability of systems running vulnerable OpenResty versions. Attackers can exploit the HashDoS vulnerability to cause excessive CPU and memory usage during proxy operations, leading to denial of service conditions. This can disrupt web services, degrade performance, and potentially cause outages. Organizations relying on OpenResty as a reverse proxy or web server component may experience service interruptions, affecting end-user access and business continuity. Since exploitation requires no authentication and can be triggered remotely, the attack surface is broad. However, the high attack complexity reduces the likelihood of widespread exploitation. The vulnerability does not affect confidentiality or integrity, limiting the impact to availability. Still, denial of service in critical infrastructure or high-traffic environments can have significant operational and reputational consequences.
Mitigation Recommendations
1. Monitor network traffic for unusual patterns indicative of hash collision attacks, such as repeated requests with similar string payloads causing high CPU usage. 2. Limit request rates and implement rate limiting or throttling on endpoints served by OpenResty to reduce the impact of crafted requests. 3. Deploy Web Application Firewalls (WAFs) with rules to detect and block suspicious request patterns targeting string hashing functions. 4. Isolate OpenResty proxy servers behind load balancers or reverse proxies that can absorb or filter malicious traffic. 5. Review and update OpenResty versions regularly; apply patches or updates from the OpenResty project as soon as they become available. 6. Consider temporary workarounds such as disabling or modifying features that heavily rely on string interning if feasible. 7. Conduct performance testing under simulated attack conditions to understand system behavior and prepare incident response plans. 8. Engage with the OpenResty community or maintainers for early access to fixes or mitigation guidance.
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- mitre
- Date Reserved
- 2024-06-27T00:00:00.000Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 699f6c87b7ef31ef0b565e90
Added to database: 2/25/2026, 9:41:27 PM
Last enriched: 2/26/2026, 5:55:56 AM
Last updated: 4/12/2026, 3:35:14 PM
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.