Run static analysis (SAST) on the codebase looking for the unsafe pattern in the data flow.
Improper Handling of Windows Device Names
This vulnerability occurs when an application builds file paths from user input but fails to properly recognize or handle Windows reserved device names like AUX, CON, or COM1. Attackers can exploit…
What is CWE-67?
Real-world CVEs caused by CWE-67
-
Server allows remote attackers to cause a denial of service via a series of requests to .JSP files that contain an MS-DOS device name.
-
Server allows remote attackers to cause a denial of service via an HTTP request for an MS-DOS device name.
-
Product allows remote attackers to use MS-DOS device names in HTTP requests to cause a denial of service or obtain the physical path of the server.
-
Server allows remote attackers to cause a denial of service via a URL that contains an MS-DOS device name.
-
Server allows a remote attacker to create a denial of service via a URL request which includes a MS-DOS device name.
-
Microsoft Windows 9x operating systems allow an attacker to cause a denial of service via a pathname that includes file device names, aka the "DOS Device in Path Name" vulnerability.
-
Server allows remote attackers to determine the physical path of the server via a URL containing MS-DOS device names.
-
Product does not properly handle files whose names contain reserved MS-DOS device names, which can allow malicious code to bypass detection when it is installed, copied, or executed.
Step-by-step attacker path
- 1
Identify a code path that handles untrusted input without validation.
- 2
Craft a payload that exercises the unsafe behavior — injection, traversal, overflow, or logic abuse.
- 3
Deliver the payload through a normal request and observe the application's reaction.
- 4
Iterate until the response leaks data, executes attacker code, or escalates privileges.
Vulnerable pseudo
MITRE has not published a code example for this CWE. The pattern below is illustrative — see Resources for canonical references.
// Example pattern — see MITRE for the canonical references.
function handleRequest(input) {
// Untrusted input flows directly into the sensitive sink.
return executeUnsafe(input);
} Secure pseudo
// Validate, sanitize, or use a safe API before reaching the sink.
function handleRequest(input) {
const safe = validateAndEscape(input);
return executeWithGuards(safe);
} How to prevent CWE-67
- Implementation Be familiar with the device names in the operating system where your system is deployed. Check input for these device names.
How to detect CWE-67
Run dynamic application security testing against the live endpoint.
Watch runtime logs for unusual exception traces, malformed input, or authorization bypass attempts.
Code review: flag any new code that handles input from this surface without using the validated framework helpers.
Plexicus auto-detects CWE-67 and opens a fix PR in under 60 seconds.
Codex Remedium scans every commit, identifies this exact weakness, and ships a reviewer-ready pull request with the patch. No tickets. No hand-offs.
Frequently asked questions
What is CWE-67?
This vulnerability occurs when an application builds file paths from user input but fails to properly recognize or handle Windows reserved device names like AUX, CON, or COM1. Attackers can exploit this by submitting these special names, which typically causes the application to crash, hang, or leak sensitive information when it tries to access them as regular files.
How serious is CWE-67?
MITRE rates the likelihood of exploit as High — this weakness is actively exploited in the wild and should be prioritized for remediation.
What languages or platforms are affected by CWE-67?
MITRE lists the following affected platforms: Windows.
How can I prevent CWE-67?
Be familiar with the device names in the operating system where your system is deployed. Check input for these device names.
How does Plexicus detect and fix CWE-67?
Plexicus's SAST engine matches the data-flow signature for CWE-67 on every commit. When a match is found, our Codex Remedium agent opens a fix PR with the corrected code, tests, and a one-line summary for the reviewer.
Where can I learn more about CWE-67?
MITRE publishes the canonical definition at https://cwe.mitre.org/data/definitions/67.html. You can also reference OWASP and NIST documentation for adjacent guidance.
Weaknesses related to CWE-67
Improper Handling of File Names that Identify Virtual Resources
This vulnerability occurs when software incorrectly processes a filename that points to a 'virtual' resource—like a device, pipe, or…
Improper Handling of Windows ::DATA Alternate Data Stream
This vulnerability occurs when an application fails to properly secure or monitor Windows Alternate Data Streams (ADS), allowing them to…
Improper Handling of Apple HFS+ Alternate Data Stream Path
This vulnerability occurs when software fails to correctly process HFS+ file system paths that point to alternate data streams, such as a…
Don't Let Security
Weigh You Down.
Stop choosing between AI velocity and security debt. Plexicus is the only platform that runs Vibe Coding Security and ASPM in parallel — one workflow, every codebase.