| Impact | Details |
|---|---|
|
Read Files or Directories; Modify Files or Directories |
Scope: Confidentiality, Integrity |
| Phase(s) | Mitigation |
|---|---|
|
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. |
| Nature | Type | ID | Name |
|---|---|---|---|
| ChildOf | Base Base - a weakness that is still mostly independent of a resource or technology, but with sufficient details to provide specific methods for detection and prevention. Base level weaknesses typically describe issues in terms of 2 or 3 of the following dimensions: behavior, property, technology, language, and resource. | 59 | Improper Link Resolution Before File Access ('Link Following') |
| Phase | Note |
|---|---|
| Implementation |
Class: Not Language-Specific (Undetermined Prevalence)
Class: Unix (Undetermined Prevalence)
Note: this is a curated list of examples for users to understand the variety of ways in which this weakness can be introduced. It is not a complete list of all CVEs that are related to this CWE entry.
| Reference | Description |
|---|---|
|
Hard link attack, file overwrite; interesting because program checks against soft links
|
|
|
Hard link and possibly symbolic link following vulnerabilities in embedded operating system allow local users to overwrite arbitrary files.
|
|
|
Server creates hard links and unlinks files as root, which allows local users to gain privileges by deleting and overwriting arbitrary files.
|
|
|
Operating system allows local users to conduct a denial of service by creating a hard link from a device special file to a file on an NFS file system.
|
|
|
Web hosting manager follows hard links, which allows local users to read or modify arbitrary files.
|
|
|
Package listing system allows local users to overwrite arbitrary files via a hard link attack on the lockfiles.
|
|
|
The Finder in Mac OS X and earlier allows local users to overwrite arbitrary files and gain privileges by creating a hard link from the .DS_Store file to an arbitrary file.
|
|
|
Hard link race condition
|
|
|
"Zip Slip" vulnerability in Go-based Open Container Initiative (OCI) registries product allows writing arbitrary files outside intended directory via symbolic links or hard links in a gzipped tarball.
|
|
|
setuid root tool allows attackers to read secret data by replacing a temp file with a hard link to a sensitive file
|
| Ordinality | Description |
|---|---|
|
Resultant
|
(where the weakness is typically related to the presence of some other weaknesses)
|
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 743 | CERT C Secure Coding Standard (2008) Chapter 10 - Input Output (FIO) |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 877 | CERT C++ Secure Coding Section 09 - Input Output (FIO) |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 980 | SFP Secondary Cluster: Link in Resource Name Resolution |
| MemberOf | CategoryCategory - a CWE entry that contains a set of other entries that share a common characteristic. | 1404 | Comprehensive Categorization: File Handling |
Rationale
This CWE entry is at the Variant level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.Comments
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.| Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
|---|---|---|---|
| PLOVER | UNIX hard link | ||
| CERT C Secure Coding | FIO05-C | Identify files using multiple file attributes | |
| Software Fault Patterns | SFP18 | Link in resource name resolution |
| Submissions | ||
|---|---|---|
| Submission Date | Submitter | Organization |
|
2006年07月19日
(CWE Draft 3, 2006年07月19日) |
PLOVER | |
| Modifications | ||
| Modification Date | Modifier | Organization |
|
2025年09月09日
(CWE 4.18, 2025年09月09日) |
CWE Content Team | MITRE |
| updated Affected_Resources, Functional_Areas | ||
|
2024年07月16日
(CWE 4.15, 2024年07月16日) |
CWE Content Team | MITRE |
| updated Observed_Examples | ||
| 2023年10月26日 | CWE Content Team | MITRE |
| updated Observed_Examples | ||
| 2023年06月29日 | CWE Content Team | MITRE |
| updated Mapping_Notes | ||
| 2023年04月27日 | CWE Content Team | MITRE |
| updated Relationships | ||
| 2023年01月31日 | CWE Content Team | MITRE |
| updated Description | ||
| 2022年10月13日 | CWE Content Team | MITRE |
| updated Observed_Examples | ||
| 2022年04月28日 | CWE Content Team | MITRE |
| updated Research_Gaps | ||
| 2020年02月24日 | CWE Content Team | MITRE |
| updated Relationships | ||
| 2017年11月08日 | CWE Content Team | MITRE |
| updated Applicable_Platforms, Causal_Nature, Observed_Examples, Relationships, Taxonomy_Mappings | ||
| 2014年07月30日 | CWE Content Team | MITRE |
| updated Relationships, Taxonomy_Mappings | ||
| 2012年10月30日 | CWE Content Team | MITRE |
| updated Potential_Mitigations | ||
| 2012年05月11日 | CWE Content Team | MITRE |
| updated Observed_Examples, References, Relationships | ||
| 2011年09月13日 | CWE Content Team | MITRE |
| updated Relationships, Taxonomy_Mappings | ||
| 2011年06月01日 | CWE Content Team | MITRE |
| updated Common_Consequences | ||
| 2008年11月24日 | CWE Content Team | MITRE |
| updated Relationships, Taxonomy_Mappings | ||
| 2008年10月14日 | CWE Content Team | MITRE |
| updated Description | ||
| 2008年09月08日 | CWE Content Team | MITRE |
| updated Applicable_Platforms, Relationships, Taxonomy_Mappings, Weakness_Ordinalities | ||
| 2008年07月01日 | Eric Dalci | Cigital |
| updated Time_of_Introduction | ||
Use of the Common Weakness Enumeration (CWE™) and the associated references from this website are subject to the Terms of Use. CWE is sponsored by the U.S. Department of Homeland Security (DHS) Cybersecurity and Infrastructure Security Agency (CISA) and managed by the Homeland Security Systems Engineering and Development Institute (HSSEDI) which is operated by The MITRE Corporation (MITRE). Copyright © 2006–2025, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation.