124
Phase: Architecture and Design
Strategy = Separation of Privilege
Follow the principle of least privilege when assigning access rights to entities in a software
system. Denying access to a file can prevent an attacker from replacing that file with a link to a
sensitive file. Ensure good compartmentalization in the system to provide protected areas that
can be trusted.
Observed Examples
Reference Description
CVE-2002-0725 File system allows local attackers to hide file usage activities via a hard link to
the target file, which causes the link to be recorded in the audit trail instead of
the target file.
https://www.cve.org/CVERecord?id=CVE-2002-0725
CVE-2003-0844 Web server plugin allows local users to overwrite arbitrary files via a symlink
attack on predictable temporary filenames.
https://www.cve.org/CVERecord?id=CVE-2003-0844
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 743 CERT C Secure Coding Standard (2008) Chapter 10 -
Input Output (FIO)
734 2347
MemberOf 877 CERT C++ Secure Coding Section 09 - Input Output
(FIO)
868 2377
MemberOf 980 SFP Secondary Cluster: Link in Resource Name
Resolution
888 2409
MemberOf 1404 Comprehensive Categorization: File Handling 1400 2529
Taxonomy Mappings
Mapped Taxonomy Name Node ID Fit Mapped Node Name
PLOVER Windows hard link
CERT C Secure Coding FIO05-C Identify files using multiple file attributes
Software Fault Patterns SFP18 Link in resource name resolution
References
[REF-62]Mark Dowd, John McDonald and Justin Schuh. "The Art of Software Security
Assessment". 1st Edition. 2006. Addison Wesley.
CWE-66: Improper Handling of File Names that Identify Virtual Resources
Weakness ID : 66
Structure : Simple
Abstraction : Base
Description
The product does not handle or incorrectly handles a file name that identifies a "virtual" resource
that is not directly specified within the directory that is associated with the file name, causing the
product to perform file-based operations on a resource that is not a file.
Extended Description
CWE Version 4.14
CWE-66: Improper Handling of File Names that Identify Virtual Resources
CWE-66: Improper Handling of File Names that Identify Virtual Resources