CVE-2024-27933 (GCVE-0-2024-27933)
Vulnerability from cvelistv5 – Published: 2024-03-06 20:52 – Updated: 2024-08-02 19:55
VLAI?
Title
Deno arbitrary file descriptor close via `op_node_ipc_pipe()` leading to permission prompt bypass
Summary
Deno is a JavaScript, TypeScript, and WebAssembly runtime. In version 1.39.0, use of raw file descriptors in `op_node_ipc_pipe()` leads to premature close of arbitrary file descriptors, allowing standard input to be re-opened as a different resource resulting in permission prompt bypass. Node child_process IPC relies on the JS side to pass the raw IPC file descriptor to `op_node_ipc_pipe()`, which returns a `IpcJsonStreamResource` ID associated with the file descriptor. On closing the resource, the raw file descriptor is closed together.
Use of raw file descriptors in `op_node_ipc_pipe()` leads to premature close of arbitrary file descriptors. This allow standard input (fd 0) to be closed and re-opened for a different resource, which allows a silent permission prompt bypass. This is exploitable by an attacker controlling the code executed inside a Deno runtime to obtain arbitrary code execution on the host machine regardless of permissions.
This bug is known to be exploitable. There is a working exploit that achieves arbitrary code execution by bypassing prompts from zero permissions, additionally abusing the fact that Cache API lacks filesystem permission checks. The attack can be conducted silently as stderr can also be closed, suppressing all prompt outputs.
Version 1.39.1 fixes the bug.
Severity ?
8.3 (High)
CWE
- CWE-863 - Incorrect Authorization
Assigner
References
| URL | Tags | |||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||||||||||||||||||||
{
"containers": {
"adp": [
{
"providerMetadata": {
"dateUpdated": "2024-08-02T00:41:55.828Z",
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE"
},
"references": [
{
"name": "https://github.com/denoland/deno/security/advisories/GHSA-6q4w-9x56-rmwq",
"tags": [
"x_refsource_CONFIRM",
"x_transferred"
],
"url": "https://github.com/denoland/deno/security/advisories/GHSA-6q4w-9x56-rmwq"
},
{
"name": "https://github.com/denoland/deno/commit/55fac9f5ead6d30996400e8597c969b675c5a22b",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/denoland/deno/commit/55fac9f5ead6d30996400e8597c969b675c5a22b"
},
{
"name": "https://github.com/denoland/deno/commit/5a91a065b882215dde209baf626247e54c21a392",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/denoland/deno/commit/5a91a065b882215dde209baf626247e54c21a392"
},
{
"name": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L214",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L214"
},
{
"name": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L220",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L220"
},
{
"name": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L225",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L225"
},
{
"name": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L241",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L241"
},
{
"name": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L256",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L256"
},
{
"name": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L265",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L265"
},
{
"name": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L99",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L99"
}
],
"title": "CVE Program Container"
},
{
"affected": [
{
"cpes": [
"cpe:2.3:a:denoland:deno:1.39.0:*:*:*:*:*:*:*"
],
"defaultStatus": "unknown",
"product": "deno",
"vendor": "denoland",
"versions": [
{
"status": "affected",
"version": "1.39.0"
}
]
}
],
"metrics": [
{
"other": {
"content": {
"id": "CVE-2024-27933",
"options": [
{
"Exploitation": "poc"
},
{
"Automatable": "no"
},
{
"Technical Impact": "total"
}
],
"role": "CISA Coordinator",
"timestamp": "2024-08-02T19:54:07.494367Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2024-08-02T19:55:09.948Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"product": "deno",
"vendor": "denoland",
"versions": [
{
"status": "affected",
"version": "= 1.39.0"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "Deno is a JavaScript, TypeScript, and WebAssembly runtime. In version 1.39.0, use of raw file descriptors in `op_node_ipc_pipe()` leads to premature close of arbitrary file descriptors, allowing standard input to be re-opened as a different resource resulting in permission prompt bypass. Node child_process IPC relies on the JS side to pass the raw IPC file descriptor to `op_node_ipc_pipe()`, which returns a `IpcJsonStreamResource` ID associated with the file descriptor. On closing the resource, the raw file descriptor is closed together.\n\nUse of raw file descriptors in `op_node_ipc_pipe()` leads to premature close of arbitrary file descriptors. This allow standard input (fd 0) to be closed and re-opened for a different resource, which allows a silent permission prompt bypass. This is exploitable by an attacker controlling the code executed inside a Deno runtime to obtain arbitrary code execution on the host machine regardless of permissions.\n\nThis bug is known to be exploitable. There is a working exploit that achieves arbitrary code execution by bypassing prompts from zero permissions, additionally abusing the fact that Cache API lacks filesystem permission checks. The attack can be conducted silently as stderr can also be closed, suppressing all prompt outputs.\n\nVersion 1.39.1 fixes the bug.\n"
}
],
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "LOCAL",
"availabilityImpact": "HIGH",
"baseScore": 8.3,
"baseSeverity": "HIGH",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"privilegesRequired": "HIGH",
"scope": "CHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H",
"version": "3.1"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-863",
"description": "CWE-863: Incorrect Authorization",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2024-03-06T20:52:17.599Z",
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M"
},
"references": [
{
"name": "https://github.com/denoland/deno/security/advisories/GHSA-6q4w-9x56-rmwq",
"tags": [
"x_refsource_CONFIRM"
],
"url": "https://github.com/denoland/deno/security/advisories/GHSA-6q4w-9x56-rmwq"
},
{
"name": "https://github.com/denoland/deno/commit/55fac9f5ead6d30996400e8597c969b675c5a22b",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/denoland/deno/commit/55fac9f5ead6d30996400e8597c969b675c5a22b"
},
{
"name": "https://github.com/denoland/deno/commit/5a91a065b882215dde209baf626247e54c21a392",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/denoland/deno/commit/5a91a065b882215dde209baf626247e54c21a392"
},
{
"name": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L214",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L214"
},
{
"name": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L220",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L220"
},
{
"name": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L225",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L225"
},
{
"name": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L241",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L241"
},
{
"name": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L256",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L256"
},
{
"name": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L265",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L265"
},
{
"name": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L99",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L99"
}
],
"source": {
"advisory": "GHSA-6q4w-9x56-rmwq",
"discovery": "UNKNOWN"
},
"title": "Deno arbitrary file descriptor close via `op_node_ipc_pipe()` leading to permission prompt bypass"
}
},
"cveMetadata": {
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"cveId": "CVE-2024-27933",
"datePublished": "2024-03-06T20:52:17.599Z",
"dateReserved": "2024-02-28T15:14:14.216Z",
"dateUpdated": "2024-08-02T19:55:09.948Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.1",
"vulnerability-lookup:meta": {
"vulnrichment": {
"containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://github.com/denoland/deno/security/advisories/GHSA-6q4w-9x56-rmwq\", \"name\": \"https://github.com/denoland/deno/security/advisories/GHSA-6q4w-9x56-rmwq\", \"tags\": [\"x_refsource_CONFIRM\", \"x_transferred\"]}, {\"url\": \"https://github.com/denoland/deno/commit/55fac9f5ead6d30996400e8597c969b675c5a22b\", \"name\": \"https://github.com/denoland/deno/commit/55fac9f5ead6d30996400e8597c969b675c5a22b\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}, {\"url\": \"https://github.com/denoland/deno/commit/5a91a065b882215dde209baf626247e54c21a392\", \"name\": \"https://github.com/denoland/deno/commit/5a91a065b882215dde209baf626247e54c21a392\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}, {\"url\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L214\", \"name\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L214\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}, {\"url\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L220\", \"name\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L220\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}, {\"url\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L225\", \"name\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L225\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}, {\"url\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L241\", \"name\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L241\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}, {\"url\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L256\", \"name\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L256\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}, {\"url\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L265\", \"name\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L265\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}, {\"url\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L99\", \"name\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L99\", \"tags\": [\"x_refsource_MISC\", \"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-02T00:41:55.828Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-27933\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"poc\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"total\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-08-02T19:54:07.494367Z\"}}}], \"affected\": [{\"cpes\": [\"cpe:2.3:a:denoland:deno:1.39.0:*:*:*:*:*:*:*\"], \"vendor\": \"denoland\", \"product\": \"deno\", \"versions\": [{\"status\": \"affected\", \"version\": \"1.39.0\"}], \"defaultStatus\": \"unknown\"}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-08-02T19:55:05.745Z\"}}], \"cna\": {\"title\": \"Deno arbitrary file descriptor close via `op_node_ipc_pipe()` leading to permission prompt bypass\", \"source\": {\"advisory\": \"GHSA-6q4w-9x56-rmwq\", \"discovery\": \"UNKNOWN\"}, \"metrics\": [{\"cvssV3_1\": {\"scope\": \"CHANGED\", \"version\": \"3.1\", \"baseScore\": 8.3, \"attackVector\": \"LOCAL\", \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H\", \"integrityImpact\": \"HIGH\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"HIGH\", \"confidentialityImpact\": \"HIGH\"}}], \"affected\": [{\"vendor\": \"denoland\", \"product\": \"deno\", \"versions\": [{\"status\": \"affected\", \"version\": \"= 1.39.0\"}]}], \"references\": [{\"url\": \"https://github.com/denoland/deno/security/advisories/GHSA-6q4w-9x56-rmwq\", \"name\": \"https://github.com/denoland/deno/security/advisories/GHSA-6q4w-9x56-rmwq\", \"tags\": [\"x_refsource_CONFIRM\"]}, {\"url\": \"https://github.com/denoland/deno/commit/55fac9f5ead6d30996400e8597c969b675c5a22b\", \"name\": \"https://github.com/denoland/deno/commit/55fac9f5ead6d30996400e8597c969b675c5a22b\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/denoland/deno/commit/5a91a065b882215dde209baf626247e54c21a392\", \"name\": \"https://github.com/denoland/deno/commit/5a91a065b882215dde209baf626247e54c21a392\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L214\", \"name\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L214\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L220\", \"name\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L220\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L225\", \"name\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L225\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L241\", \"name\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L241\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L256\", \"name\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L256\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L265\", \"name\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L265\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L99\", \"name\": \"https://github.com/denoland/deno/blob/v1.39.0/runtime/permissions/prompter.rs#L99\", \"tags\": [\"x_refsource_MISC\"]}], \"descriptions\": [{\"lang\": \"en\", \"value\": \"Deno is a JavaScript, TypeScript, and WebAssembly runtime. In version 1.39.0, use of raw file descriptors in `op_node_ipc_pipe()` leads to premature close of arbitrary file descriptors, allowing standard input to be re-opened as a different resource resulting in permission prompt bypass. Node child_process IPC relies on the JS side to pass the raw IPC file descriptor to `op_node_ipc_pipe()`, which returns a `IpcJsonStreamResource` ID associated with the file descriptor. On closing the resource, the raw file descriptor is closed together.\\n\\nUse of raw file descriptors in `op_node_ipc_pipe()` leads to premature close of arbitrary file descriptors. This allow standard input (fd 0) to be closed and re-opened for a different resource, which allows a silent permission prompt bypass. This is exploitable by an attacker controlling the code executed inside a Deno runtime to obtain arbitrary code execution on the host machine regardless of permissions.\\n\\nThis bug is known to be exploitable. There is a working exploit that achieves arbitrary code execution by bypassing prompts from zero permissions, additionally abusing the fact that Cache API lacks filesystem permission checks. The attack can be conducted silently as stderr can also be closed, suppressing all prompt outputs.\\n\\nVersion 1.39.1 fixes the bug.\\n\"}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-863\", \"description\": \"CWE-863: Incorrect Authorization\"}]}], \"providerMetadata\": {\"orgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"shortName\": \"GitHub_M\", \"dateUpdated\": \"2024-03-06T20:52:17.599Z\"}}}",
"cveMetadata": "{\"cveId\": \"CVE-2024-27933\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-08-02T19:55:09.948Z\", \"dateReserved\": \"2024-02-28T15:14:14.216Z\", \"assignerOrgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"datePublished\": \"2024-03-06T20:52:17.599Z\", \"assignerShortName\": \"GitHub_M\"}",
"dataType": "CVE_RECORD",
"dataVersion": "5.1"
}
}
}
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…