Skip to main content

CVE-2022-36034: CWE-400: Uncontrolled Resource Consumption in cainthebest nitrado.js

Medium
Published: Mon Aug 29 2022 (08/29/2022, 16:50:09 UTC)
Source: CVE
Vendor/Project: cainthebest
Product: nitrado.js

Description

nitrado.js is a type safe wrapper for the Nitrado API. Possible ReDoS with lib input of `{{` and with many repetitions of `{{|`. This issue has been patched in all versions above `0.2.5`. There are currently no known workarounds.

AI-Powered Analysis

AILast updated: 06/22/2025, 23:34:36 UTC

Technical Analysis

CVE-2022-36034 is a vulnerability identified in the npm package nitrado.js, a type-safe wrapper for the Nitrado API, maintained by the vendor 'cainthebest'. The vulnerability is classified under CWE-400 (Uncontrolled Resource Consumption) and CWE-1333 (Inefficient Regular Expression Complexity). Specifically, the issue arises from the way the library processes certain input patterns involving repeated occurrences of '{{' and '{{|'. This input can trigger a Regular Expression Denial of Service (ReDoS) attack, where the regular expression engine consumes excessive CPU resources when attempting to parse crafted inputs. This leads to degraded performance or potential service unavailability for applications using vulnerable versions of nitrado.js prior to version 0.2.5. The vulnerability does not require authentication or user interaction to be exploited, as it depends on the processing of input data within the library. No known exploits have been reported in the wild, and no workarounds exist other than upgrading to patched versions above 0.2.5. The vulnerability was publicly disclosed on August 29, 2022, and has been enriched by CISA, indicating recognition by US cybersecurity authorities. The root cause is inefficient handling of regular expressions that can be manipulated to cause excessive backtracking, leading to resource exhaustion on the host system.

Potential Impact

For European organizations utilizing nitrado.js versions below 0.2.5, this vulnerability poses a risk of service disruption due to resource exhaustion. Applications relying on this library for interfacing with the Nitrado API could experience degraded performance or downtime if an attacker sends maliciously crafted inputs exploiting the ReDoS condition. This can impact availability, potentially interrupting business operations, especially for companies in the gaming, hosting, or cloud service sectors that use Nitrado's services. While confidentiality and integrity impacts are minimal since this is a denial-of-service type vulnerability, the operational impact can be significant if critical services become unresponsive. Additionally, if the affected systems are part of larger automated workflows or API integrations, the cascading effect could disrupt dependent services. Given the lack of authentication requirements, attackers can exploit this remotely without credentials, increasing the attack surface. The absence of known exploits suggests limited active targeting so far, but the ease of exploitation and potential impact on availability warrant attention.

Mitigation Recommendations

The primary and most effective mitigation is to upgrade nitrado.js to version 0.2.5 or later, where the vulnerability has been patched. Organizations should audit their software dependencies to identify any usage of vulnerable nitrado.js versions and prioritize updates. For environments where immediate upgrading is not feasible, implementing input validation and sanitization to detect and block suspicious patterns resembling the ReDoS trigger inputs (e.g., repeated '{{' or '{{|' sequences) can reduce risk. Additionally, applying runtime resource limits such as CPU timeouts or memory caps on processes handling API requests can help mitigate the impact of potential resource exhaustion. Monitoring application performance metrics and setting alerts for unusual CPU spikes or slowdowns can provide early detection of exploitation attempts. Finally, incorporating fuzz testing and regular expression complexity analysis into the development lifecycle can prevent similar issues in future dependencies.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-07-15T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9844c4522896dcbf3bac

Added to database: 5/21/2025, 9:09:24 AM

Last enriched: 6/22/2025, 11:34:36 PM

Last updated: 8/1/2025, 6:58:35 PM

Views: 8

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

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

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats