CVE-2024-27602
Executive Summary
CVE-2024-27602 identifies an Incorrect Access Control vulnerability in Alldata V0.4.6. The vulnerability allows unauthenticated remote attackers to access a large number of API interface documentation endpoints, specifically the /api/system/v2/api-docs module. This leakage exposes the entire API surface, including endpoints, parameters, data structures, and authentication schemes, providing attackers with a detailed blueprint for further exploitation.
The vulnerability is classified as CWE-284: Improper Access Control, with a CVSS v3.1 base score of 7.5 (High). The attack vector is network-based, requires no privileges, and no user interaction. The primary impact is on confidentiality, as sensitive API documentation is exposed.
Key Risk: The leaked API documentation can be used to identify other vulnerabilities (e.g., injection flaws, broken authentication, excessive data exposure) and to craft targeted attacks against the Alldata platform.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
Alldata is an open-source data platform. The vulnerability affects the core application, not a specific package manager (NPM, PyPI, Go, Ruby). However, organizations using Alldata as part of their data pipeline should treat this as a supply chain risk, as the exposed API documentation can reveal integration points and data flow details.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): None (N) – No user action required.
- Scope (S): Unchanged (U) – The vulnerable component is the only affected component.
- Confidentiality (C): High (H) – Complete disclosure of API documentation.
- Integrity (I): None (N) – No data modification.
- Availability (A): None (N) – No denial of service.
CVSS Score: 7.5 (High)
Threat Level: High. The vulnerability is trivial to exploit and provides a significant information disclosure that can enable further attacks.
Deep Dive & Mechanics
The vulnerability stems from a misconfiguration in the access control mechanism for the Swagger/OpenAPI documentation endpoint. In Alldata V0.4.6, the /api/system/v2/api-docs endpoint is exposed without any authentication or authorization checks.
How it works:
- The Alldata application uses Springfox or a similar library to generate OpenAPI documentation.
- The documentation endpoint is typically mapped to
/v2/api-docsor/api/system/v2/api-docs. - In a secure configuration, this endpoint should be restricted to authenticated users (e.g., administrators) or disabled in production.
- In the vulnerable version, the endpoint is publicly accessible, returning a JSON payload containing the entire API specification.
Impact:
- Full API Surface Exposure: Attackers can enumerate all available endpoints, HTTP methods, request parameters, and response schemas.
- Authentication Bypass Identification: The documentation may reveal authentication endpoints, token formats, and session management details.
- Data Model Disclosure: The schemas expose the structure of data objects, including sensitive fields (e.g., passwords, API keys, PII).
- Attack Surface Expansion: The documentation can be used to identify other vulnerabilities, such as injection points, IDOR, or mass assignment.
Vulnerable vs. Patched Code
Vulnerable Configuration (Alldata V0.4.6):
The application likely has a configuration similar to the following in a Spring Boot application:
// In a configuration class (e.g., SwaggerConfig.java)
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build();
}
}
This configuration exposes all API endpoints without any security constraints.
Patched Configuration (Hypothetical):
A patched version would restrict access to the documentation endpoint, for example:
// In a security configuration class (e.g., SecurityConfig.java)
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.antMatchers("/api/system/v2/api-docs").hasRole("ADMIN")
.anyRequest().authenticated()
.and()
.httpBasic();
}
Or, the documentation could be disabled entirely in production:
// In application.properties
springfox.documentation.swagger.v2.path=/api/system/v2/api-docs
springfox.documentation.enabled=false
Exploitation & Lab Setup
Red Team
Objective: Extract the full API documentation from a vulnerable Alldata instance.
Prerequisites:
- Target Alldata V0.4.6 instance (e.g.,
http://target:8080). - Network access to the target.
Exploitation Steps:
Identify the Endpoint: Use a web browser or tool like
curlto access the documentation endpoint.curl -v http://target:8080/api/system/v2/api-docsExtract the JSON: The response will be a large JSON object. Save it to a file for analysis.
curl -s http://target:8080/api/system/v2/api-docs > api-docs.jsonAnalyze the Documentation: Use tools like
jqor a Swagger UI viewer to parse the JSON.# List all paths jq '.paths | keys' api-docs.json # Get details for a specific endpoint jq '.paths["/api/users"]' api-docs.jsonAutomated Exploitation (Nuclei): Although no template was provided, you can create a custom Nuclei template:
id: alldata-api-docs-leak info: name: Alldata API Documentation Leak author: your-name severity: high description: Detects exposed Alldata API documentation endpoint. requests: - method: GET path: - "{{BaseURL}}/api/system/v2/api-docs" matchers-condition: and matchers: - type: word words: - "swagger" - "openapi" condition: or - type: status status: - 200
Blue Team
Objective: Detect and respond to exploitation attempts.
Detection Steps:
Monitor Access Logs: Look for requests to
/api/system/v2/api-docsfrom unexpected IP addresses.grep "/api/system/v2/api-docs" /var/log/nginx/access.logAnalyze Network Traffic: Use a packet capture tool to identify large JSON responses from the documentation endpoint.
Honeypot: Deploy a fake Alldata instance and monitor for requests to the documentation endpoint.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP GET requests to
/api/system/v2/api-docs - HTTP responses with
Content-Type: application/jsonand body containing"swagger": "2.0"or"openapi": "3.0.0" - Source IP addresses scanning for the endpoint.
- HTTP GET requests to
File IOCs:
- Files named
api-docs.jsonor similar on attacker systems. - Log entries containing the full API documentation JSON.
- Files named
Behavioral IOCs:
- Unusual number of API requests following the documentation retrieval.
- Attempts to access endpoints listed in the documentation that were previously unknown.
Detection Engineering
YARA Rule
rule Alldata_API_Docs_Leak {
meta:
description = "Detects Alldata API documentation leakage in HTTP responses"
author = "Valters IT"
date = "2024-01-01"
hash = "d41d8cd98f00b204e9800998ecf8427e"
strings:
$swagger = "swagger" nocase
$openapi = "openapi" nocase
$alldata = "Alldata" nocase
$api_docs = "/api/system/v2/api-docs"
condition:
any of ($swagger, $openapi) and $alldata and $api_docs
}
Sigma Rule
title: Alldata API Documentation Leak
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects HTTP requests to the Alldata API documentation endpoint
author: Valters IT
date: 2024/01/01
logsource:
category: webserver
product: nginx
detection:
selection:
cs-uri-stem:
- '/api/system/v2/api-docs'
condition: selection
falsepositives:
- Legitimate administrative access
level: high
Suricata Rule
alert http any any -> any any (msg:"Alldata API Documentation Leak Detected"; flow:to_server; content:"GET"; http_method; content:"/api/system/v2/api-docs"; http_uri; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Restrict Access: Implement access control on the
/api/system/v2/api-docsendpoint. Only allow authenticated users with administrative privileges. - Disable in Production: Set
springfox.documentation.enabled=falsein the application properties for production environments. - Network Segmentation: Place the Alldata instance behind a firewall or reverse proxy that blocks external access to the documentation endpoint.
Long-Term Fixes:
- Upgrade: Monitor the Alldata project for a patched version (V0.4.7 or later) and apply the update.
- Code Review: Review the security configuration of all API documentation endpoints.
- Security Testing: Include API documentation exposure checks in your CI/CD pipeline.
Compensating Controls:
- Web Application Firewall (WAF): Create a rule to block requests to
/api/system/v2/api-docsfrom untrusted sources. - API Gateway: Use an API gateway to enforce authentication and rate limiting on all API endpoints.
Valters IT
Securing Digital Frontiers