Skip to main content

CVE-2022-24863: CWE-400: Uncontrolled Resource Consumption in swaggo http-swagger

Medium
Published: Mon Apr 18 2022 (04/18/2022, 19:00:22 UTC)
Source: CVE
Vendor/Project: swaggo
Product: http-swagger

Description

http-swagger is an open source wrapper to automatically generate RESTful API documentation with Swagger 2.0. In versions of http-swagger prior to 1.2.6 an attacker may perform a denial of service attack consisting of memory exhaustion on the host system. The cause of the memory exhaustion is down to improper handling of http methods. Users are advised to upgrade. Users unable to upgrade may to restrict the path prefix to the "GET" method as a workaround.

AI-Powered Analysis

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

Technical Analysis

CVE-2022-24863 is a vulnerability classified under CWE-400 (Uncontrolled Resource Consumption) affecting the open-source project swaggo's http-swagger component, which is used to automatically generate RESTful API documentation compliant with Swagger 2.0 specifications. Specifically, versions of http-swagger prior to 1.2.6 are vulnerable to a denial of service (DoS) attack caused by memory exhaustion. The root cause lies in improper handling of HTTP methods other than GET, allowing an attacker to send crafted requests that consume excessive memory resources on the host system. This uncontrolled resource consumption can degrade system performance or cause the application or host to crash, resulting in service unavailability. The vulnerability does not require authentication, and exploitation can be performed remotely by sending malicious HTTP requests. No known exploits have been reported in the wild to date. The recommended remediation is to upgrade to version 1.2.6 or later, where the issue has been fixed. For users unable to upgrade immediately, a temporary mitigation involves restricting the API documentation endpoint to accept only GET requests, thereby preventing exploitation via other HTTP methods that trigger the memory exhaustion. This vulnerability primarily impacts systems exposing the http-swagger interface, which is commonly used in development and testing environments but may also be present in production API documentation services.

Potential Impact

For European organizations, the impact of this vulnerability can range from temporary service disruption to more significant denial of service conditions affecting API documentation availability. While the vulnerability does not directly compromise data confidentiality or integrity, the loss of availability can hinder developer productivity, delay API integration efforts, and potentially disrupt dependent services that rely on up-to-date API documentation. Organizations with public-facing APIs or internal developer portals using vulnerable versions of http-swagger are at risk. In sectors such as finance, healthcare, and critical infrastructure, where API documentation is integral to operations and compliance, such disruptions could have downstream operational impacts. Additionally, attackers could leverage this vulnerability as part of a broader attack chain to cause distraction or resource exhaustion on critical systems. Given the ease of exploitation without authentication and the potential for widespread impact on service availability, European organizations should prioritize addressing this vulnerability to maintain operational resilience.

Mitigation Recommendations

1. Upgrade http-swagger to version 1.2.6 or later immediately to apply the official fix addressing the memory exhaustion issue. 2. If upgrading is not feasible in the short term, configure web server or application-level controls to restrict the http-swagger endpoint to accept only GET HTTP methods, effectively blocking other methods that trigger the vulnerability. 3. Implement rate limiting and request throttling on the API documentation endpoints to reduce the risk of resource exhaustion from excessive requests. 4. Monitor application and system logs for unusual spikes in HTTP requests, especially non-GET methods targeting the documentation endpoints. 5. Employ Web Application Firewalls (WAFs) with custom rules to block or challenge suspicious HTTP methods or malformed requests directed at the http-swagger interface. 6. Conduct regular security assessments and penetration testing focused on API documentation services to detect similar resource exhaustion vulnerabilities. 7. Educate development and operations teams about the risks of exposing API documentation services without proper access controls and monitoring.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d9843c4522896dcbf2cb0

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

Last enriched: 6/23/2025, 10:36:34 AM

Last updated: 7/26/2025, 1:26:12 PM

Views: 12

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