Vulnerability MediumRUSTSEC-2025-0138 · deno
RUSTSEC-2025-0138: --allow-read / --allow-write permission bypass in `node:sqlite`
Short answerA security vulnerability in the deno crate: --allow-read / --allow-write permission bypass in `node:sqlite`. GitHub rates it Medium. Fixed in 2.2.5: update to a fixed version.
| Crate | deno |
|---|---|
| Type | Vulnerability |
| Affected versions | From 2.2.0 before 2.2.5. |
| Fixed in | 2.2.5 |
| Severity | Medium (GitHub rating) CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P |
| Published | 2025-06-03 |
| Last changed | 2026-10-12 |
| Also known as | CVE-2025-48935, GHSA-8vxj-4cph-c596 |
What to do
- See which version you have:
cargo tree -i deno(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p deno. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for exampledeno = "2.2.5") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
It is possible to bypass Deno's read/write permission checks by using ATTACH DATABASE statement.
PoC
// poc.js
import { DatabaseSync } from "node:sqlite"
const db = new DatabaseSync(":memory:");
db.exec("ATTACH DATABASE 'test.db' as test;");
db.exec("CREATE TABLE test.test (id INTEGER PRIMARY KEY, name TEXT);");
$ deno poc.js
References
- Package: crates.io/crates/deno
- Advisory: rustsec.org/advisories/RUSTSEC-2025-0138.html
- Web: github.com/denoland/deno/commit/31a97803995bd94629528ba841b2418d3ca01860
- Web: github.com/denoland/deno/commit/31a97803995bd94629528ba841b2418d3ca01860
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Other advisories for deno
- VulnerabilityGHSA-23rx-c3g5-hv9w · 2024-05-08Deno permission escalation vulnerability via open of privileged files with missing `--deny` flag
- VulnerabilityGHSA-2x3r-hwv5-p32x · 2025-06-04Deno's AES GCM authentication tags are not verified
- VulnerabilityGHSA-3j27-563v-28wf · 2024-03-06*const c_void / ExternalPointer unsoundness leading to use-after-free
- VulnerabilityGHSA-4c8g-jvcx-v4hv · 2026-06-16Deno: process.loadEnvFile() bypasses env permission checks and mutates process.env with only read access
- VulnerabilityGHSA-4c96-w8v2-p28j · 2026-03-13Deno vulnerable to command Injection via incomplete shell metacharacter blocklist in node:child_process
- VulnerabilityGHSA-5379-f5hf-w38v · 2026-01-16Deno node:crypto doesn't finalize cipher
- VulnerabilityGHSA-5frw-4rwq-xhcr · 2024-03-06Deno's improper suffix match testing for DENO_AUTH_TOKENS
- VulnerabilityGHSA-67hm-27mx-9cg7 · 2022-06-13Link Following in Deno
Up next
Same cratedeno: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?