CWE-67
Improper Handling of Windows Device Names
The product constructs pathnames from user input, but it does not handle or incorrectly handles a pathname containing a Windows device name such as AUX or CON. This typically leads to denial of service or an information exposure when the application attempts to process the pathname as a regular file.
CVE-2024-35197 (GCVE-0-2024-35197)
Vulnerability from cvelistv5
Published
2024-05-23 12:09
Modified
2024-08-02 03:07
Severity ?
VLAI Severity ?
EPSS score ?
CWE
- CWE-67 - Improper Handling of Windows Device Names
Summary
gitoxide is a pure Rust implementation of Git. On Windows, fetching refs that clash with legacy device names reads from the devices, and checking out paths that clash with such names writes arbitrary data to the devices. This allows a repository, when cloned, to cause indefinite blocking or the production of arbitrary message that appear to have come from the application, and potentially other harmful effects under limited circumstances. If Windows is not used, or untrusted repositories are not cloned or otherwise used, then there is no impact. A minor degradation in availability may also be possible, such as with a very large file named `CON`, though the user could interrupt the application.
References
► | URL | Tags | |||
---|---|---|---|---|---|
|
{ "containers": { "adp": [ { "affected": [ { "cpes": [ "cpe:2.3:a:byron:gitoxide:*:*:*:*:*:*:*:*" ], "defaultStatus": "unknown", "product": "gitoxide", "vendor": "byron", "versions": [ { "lessThan": "0.36.0", "status": "affected", "version": "0", "versionType": "custom" } ] } ], "metrics": [ { "other": { "content": { "id": "CVE-2024-35197", "options": [ { "Exploitation": "poc" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "timestamp": "2024-05-23T15:29:05.667742Z", "version": "2.0.3" }, "type": "ssvc" } } ], "providerMetadata": { "dateUpdated": "2024-06-04T17:34:47.644Z", "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP" }, "title": "CISA ADP Vulnrichment" }, { "providerMetadata": { "dateUpdated": "2024-08-02T03:07:46.729Z", "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE" }, "references": [ { "name": "https://github.com/Byron/gitoxide/security/advisories/GHSA-49jc-r788-3fc9", "tags": [ "x_refsource_CONFIRM", "x_transferred" ], "url": "https://github.com/Byron/gitoxide/security/advisories/GHSA-49jc-r788-3fc9" } ], "title": "CVE Program Container" } ], "cna": { "affected": [ { "product": "gitoxide", "vendor": "Byron", "versions": [ { "status": "affected", "version": "\u003c 0.36.0" } ] } ], "descriptions": [ { "lang": "en", "value": "gitoxide is a pure Rust implementation of Git. On Windows, fetching refs that clash with legacy device names reads from the devices, and checking out paths that clash with such names writes arbitrary data to the devices. This allows a repository, when cloned, to cause indefinite blocking or the production of arbitrary message that appear to have come from the application, and potentially other harmful effects under limited circumstances. If Windows is not used, or untrusted repositories are not cloned or otherwise used, then there is no impact. A minor degradation in availability may also be possible, such as with a very large file named `CON`, though the user could interrupt the application." } ], "metrics": [ { "cvssV3_1": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "LOW", "baseScore": 5.4, "baseSeverity": "MEDIUM", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "privilegesRequired": "NONE", "scope": "UNCHANGED", "userInteraction": "REQUIRED", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:L", "version": "3.1" } } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-67", "description": "CWE-67: Improper Handling of Windows Device Names", "lang": "en", "type": "CWE" } ] } ], "providerMetadata": { "dateUpdated": "2024-05-23T12:09:09.044Z", "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "shortName": "GitHub_M" }, "references": [ { "name": "https://github.com/Byron/gitoxide/security/advisories/GHSA-49jc-r788-3fc9", "tags": [ "x_refsource_CONFIRM" ], "url": "https://github.com/Byron/gitoxide/security/advisories/GHSA-49jc-r788-3fc9" } ], "source": { "advisory": "GHSA-49jc-r788-3fc9", "discovery": "UNKNOWN" }, "title": "gix refs and paths with reserved Windows device names access the devices" } }, "cveMetadata": { "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "assignerShortName": "GitHub_M", "cveId": "CVE-2024-35197", "datePublished": "2024-05-23T12:09:09.044Z", "dateReserved": "2024-05-10T14:24:24.343Z", "dateUpdated": "2024-08-02T03:07:46.729Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1" }
CVE-2024-51745 (GCVE-0-2024-51745)
Vulnerability from cvelistv5
Published
2024-11-05 21:09
Modified
2024-11-05 21:28
Severity ?
VLAI Severity ?
EPSS score ?
CWE
Summary
Wasmtime is a fast and secure runtime for WebAssembly. Wasmtime's filesystem sandbox implementation on Windows blocks access to special device filenames such as "COM1", "COM2", "LPT0", "LPT1", and so on, however it did not block access to the special device filenames which use superscript digits, such as "COM¹", "COM²", "LPT⁰", "LPT¹", and so on. Untrusted Wasm programs that are given access to any filesystem directory could bypass the sandbox and access devices through those special device filenames with superscript digits, and through them gain access peripheral devices connected to the computer, or network resources mapped to those devices. This can include modems, printers, network printers, and any other device connected to a serial or parallel port, including emulated USB serial ports. Patch releases for Wasmtime have been issued as 24.0.2, 25.0.3, and 26.0.1. Users of Wasmtime 23.0.x and prior are recommended to upgrade to one of these patched versions. There are no known workarounds for this issue. Affected Windows users are recommended to upgrade.
References
► | URL | Tags | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Impacted products
Vendor | Product | Version | ||
---|---|---|---|---|
bytecodealliance | wasmtime |
Version: < 24.0.2 Version: >= 25.0.0, < 25.0.3 Version: = 26.0.0 |
{ "containers": { "adp": [ { "metrics": [ { "other": { "content": { "id": "CVE-2024-51745", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "timestamp": "2024-11-05T21:28:24.494004Z", "version": "2.0.3" }, "type": "ssvc" } } ], "providerMetadata": { "dateUpdated": "2024-11-05T21:28:34.001Z", "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP" }, "title": "CISA ADP Vulnrichment" } ], "cna": { "affected": [ { "product": "wasmtime", "vendor": "bytecodealliance", "versions": [ { "status": "affected", "version": "\u003c 24.0.2" }, { "status": "affected", "version": "\u003e= 25.0.0, \u003c 25.0.3" }, { "status": "affected", "version": "= 26.0.0" } ] } ], "descriptions": [ { "lang": "en", "value": "Wasmtime is a fast and secure runtime for WebAssembly. Wasmtime\u0027s filesystem sandbox implementation on Windows blocks access to special device filenames such as \"COM1\", \"COM2\", \"LPT0\", \"LPT1\", and so on, however it did not block access to the special device filenames which use superscript digits, such as \"COM\u00b9\", \"COM\u00b2\", \"LPT\u2070\", \"LPT\u00b9\", and so on. Untrusted Wasm programs that are given access to any filesystem directory could bypass the sandbox and access devices through those special device filenames with superscript digits, and through them gain access peripheral devices connected to the computer, or network resources mapped to those devices. This can include modems, printers, network printers, and any other device connected to a serial or parallel port, including emulated USB serial ports. Patch releases for Wasmtime have been issued as 24.0.2, 25.0.3, and 26.0.1. Users of Wasmtime 23.0.x and prior are recommended to upgrade to one of these patched versions. There are no known workarounds for this issue. Affected Windows users are recommended to upgrade." } ], "metrics": [ { "cvssV4_0": { "attackComplexity": "LOW", "attackRequirements": "PRESENT", "attackVector": "NETWORK", "baseScore": 2.3, "baseSeverity": "LOW", "privilegesRequired": "LOW", "subAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "userInteraction": "NONE", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N", "version": "4.0", "vulnAvailabilityImpact": "LOW", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "LOW" } } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-67", "description": "CWE-67: Improper Handling of Windows Device Names", "lang": "en", "type": "CWE" } ] }, { "descriptions": [ { "cweId": "CWE-184", "description": "CWE-184: Incomplete List of Disallowed Inputs", "lang": "en", "type": "CWE" } ] } ], "providerMetadata": { "dateUpdated": "2024-11-05T21:09:43.943Z", "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "shortName": "GitHub_M" }, "references": [ { "name": "https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-c2f5-jxjv-2hh8", "tags": [ "x_refsource_CONFIRM" ], "url": "https://github.com/bytecodealliance/wasmtime/security/advisories/GHSA-c2f5-jxjv-2hh8" }, { "name": "https://github.com/bytecodealliance/cap-std/pull/371", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/bytecodealliance/cap-std/pull/371" }, { "name": "https://en.wikipedia.org/wiki/ISO/IEC_8859-1", "tags": [ "x_refsource_MISC" ], "url": "https://en.wikipedia.org/wiki/ISO/IEC_8859-1" }, { "name": "https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions", "tags": [ "x_refsource_MISC" ], "url": "https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions" } ], "source": { "advisory": "GHSA-c2f5-jxjv-2hh8", "discovery": "UNKNOWN" }, "title": "Wasmtime doesn\u0027t fully sandbox all the Windows device filenames" } }, "cveMetadata": { "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "assignerShortName": "GitHub_M", "cveId": "CVE-2024-51745", "datePublished": "2024-11-05T21:09:43.943Z", "dateReserved": "2024-10-31T14:12:45.790Z", "dateUpdated": "2024-11-05T21:28:34.001Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1" }
Mitigation
Phase: Implementation
Description:
- Be familiar with the device names in the operating system where your system is deployed. Check input for these device names.
No CAPEC attack patterns related to this CWE.