# CVE-2025-24786: Path traversal opening Sqlite3 database in WhoDB

> Unauthenticated attackers can use path traversal to open arbitrary SQLite databases on the host, exposing sensitive data.

- **Severity:** Critical 10.0 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 Feb 2025
- **Updated:** 6 Feb 2025
- **Also known as:** GHSA-9r4c-jwx3-3j76, GO-2025-3456

## What is CVE-2025-24786?

CVE-2025-24786 is a critical path traversal vulnerability in clidey whodb, published on 6 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

WhoDB is an open source database management tool. 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. Affected versions of WhoDB allow users to connect to Sqlite3 databases. By default, the databases must be present in `/db/` (or alternatively `./tmp/` if development mode is enabled).  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. 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. This issue has been addressed in version 0.45.0 and all users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-35 (Path Traversal: '.../...//'), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2025-24786?

3 open source packages ship an affected version, including github.com/clidey/whodb/core. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/clidey/whodb/core` | Go | All versions | 0.0.0-20250127172032-547336ac73c8 |
| `github.com/clidey/whodb/core` | Go | All versions | 0.0.0-20250127172032-547336ac73c8 |
| `github.com/clidey/whodb/core` | Go | All versions | 0.0.0-20250127172032-547336ac73c8 |

Products: Clidey Whodb.

## How do I fix CVE-2025-24786?

Upgrade github.com/clidey/whodb/core to 0.0.0-20250127172032-547336ac73c8 or later.

## Is CVE-2025-24786 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-24786 exists.

Public exploit code:

- WhoDB < 0.45.0 - Path Traversal (nuclei): http/cves/2025/CVE-2025-24786.yaml

## Other vulnerabilities in clidey whodb

- [CVE-2025-24787](https://insights.sbomify.com/CVE-2025-24787/): Parameter injection in DB connection URIs leading to local file inclusion in WhoDB (high 8.6)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-24786 and fix it if it is affected.

What it is: CVE-2025-24786 is a critical path traversal vulnerability in clidey whodb, published on 6 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-24786 exists.

Affected packages and fixed versions:
- github.com/clidey/whodb/core (Go): affected all versions; fixed in 0.0.0-20250127172032-547336ac73c8
- github.com/clidey/whodb/core (Go): affected all versions; fixed in 0.0.0-20250127172032-547336ac73c8
- github.com/clidey/whodb/core (Go): affected all versions; fixed in 0.0.0-20250127172032-547336ac73c8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-24786/ (Markdown: https://insights.sbomify.com/CVE-2025-24786/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-24786
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-24786
- OSV: https://osv.dev/vulnerability/CVE-2025-24786

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-24786/
Summaries are generated and may contain mistakes; the official description above is the record.
