title: Incorrect detection of reserved device names on Windows in path/filepath
description: On Windows, The IsLocal function does not correctly detect reserved device names in some cases. Reserved names followed by spaces, such as "COM1 ", and reserved names "COM" and "LPT" followed by superscript 1, 2, or 3, are incorrectly reported as local. With fix, IsLocal now correctly reports these names as non-local.
problem types: CWE-41: Improper Resolution of Path Equivalence
affected:
{
vendor: Go standard library
product: path/filepath
collectionURL: https://pkg.go.dev
packageName: path/filepath
versions:
version: 0, lessThan: 1.20.11, status: affected, versionType: semver
version: 1.21.0-0, lessThan: 1.21.4, status: affected, versionType: semver
programRoutines:
name: IsLocal
defaultStatus: unaffected
}