Skip to content

Commit 7e38057

Browse files
committed
Detect an exposed MuleSoft APIkit console
A MuleSoft APIkit application serves an auto-generated API Console, meant for development. Left on in production it publishes the whole API definition to anyone and lets them call the API from the browser. A read only rule looks for the console at the paths it is usually mounted on and confirms it by the element that boots the console in the page, so it fires only on the real console, not a soft 404. The fix, turning the console off with apikit.console.disabled or removing its flow, is in the remediation. The rule is read only, a plain GET, and is confirmed against a control, in keeping with the no false positive bar.
1 parent c96c1ee commit 7e38057

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"id": "misconfiguration-mulesoft-api-console-exposed",
3+
"class": "misconfiguration",
4+
"safety": "read",
5+
"severity_floor": "medium",
6+
"title": "MuleSoft APIkit console is exposed",
7+
"summary": "A MuleSoft APIkit application is serving its auto-generated API Console to anyone. The console publishes the whole API definition, every resource, method, parameter and schema, and lets a visitor call the API from the browser. It is meant for development and should be off in production.",
8+
"needs": [],
9+
"candidate_paths": [
10+
"/console/",
11+
"/console",
12+
"/api/console/",
13+
"/console/index.html",
14+
"/api-console/"
15+
],
16+
"probe": [
17+
{
18+
"request": {
19+
"method": "GET",
20+
"path": "{route}"
21+
}
22+
}
23+
],
24+
"confirm": {
25+
"control": "A path that cannot exist, so the site's not found answer is known and the console page is told apart from a soft 404.",
26+
"differential": "status == 200 and \"text/html\" in header(\"content-type\") and body_contains(\"api-console-app\") and body_differs(control)",
27+
"retest": 2
28+
},
29+
"reproduce": "curl -sk 'https://host/console/' and look for the MuleSoft API Console page: an HTTP 200 HTML response whose body carries the api-console-app element that boots the console. If present, the full API definition is published and callable. Try /console, /api/console/, /api-console/ as well, since the console path is set per application.",
30+
"remediate": "Turn the APIkit console off in production: set the system property apikit.console.disabled=true, or remove the console flow from the application, and block the console path at the gateway. Keep it to non-production environments.",
31+
"references": [],
32+
"mappings": {
33+
"cwe": "CWE-200",
34+
"owasp": "A05:2021"
35+
},
36+
"rulesets": [
37+
"mulesoft"
38+
]
39+
}

0 commit comments

Comments
 (0)