The product, when opening a file or directory, does not sufficiently account for when the name is associated with a hard link to a target that is outside of the intended control sphere. This could allow an attacker to cause the product to operate on unauthorized files.
Failure for a system to check for hard links can result in vulnerability to different types of attacks. For example, an attacker can escalate their privileges if a file used by a privileged program is replaced with a hard link to a sensitive file (e.g. /etc/passwd). When the process opens the file, the attacker can assume the privileges of that process.

Resultant

Implementation

Confidentiality
Integrity
Read Files or Directories
Modify Files or Directories

Architecture and Design
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.

CVE-2001-1494
Hard link attack, file overwrite; interesting because program checks against soft links
https://www.cve.org/CVERecord?id=CVE-2001-1494

CVE-2002-0793
Hard link and possibly symbolic link following vulnerabilities in embedded operating system allow local users to overwrite arbitrary files.
https://www.cve.org/CVERecord?id=CVE-2002-0793

CVE-2003-0578
Server creates hard links and unlinks files as root, which allows local users to gain privileges by deleting and overwriting arbitrary files.
https://www.cve.org/CVERecord?id=CVE-2003-0578

CVE-1999-0783
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.
https://www.cve.org/CVERecord?id=CVE-1999-0783

CVE-2004-1603
Web hosting manager follows hard links, which allows local users to read or modify arbitrary files.
https://www.cve.org/CVERecord?id=CVE-2004-1603

CVE-2004-1901
Package listing system allows local users to overwrite arbitrary files via a hard link attack on the lockfiles.
https://www.cve.org/CVERecord?id=CVE-2004-1901

CVE-2005-0342
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.
https://www.cve.org/CVERecord?id=CVE-2005-0342

CVE-2005-1111
Hard link race condition
https://www.cve.org/CVERecord?id=CVE-2005-1111

CVE-2021-21272
"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.
https://www.cve.org/CVERecord?id=CVE-2021-21272

CVE-2003-1366
setuid root tool allows attackers to read secret data by replacing a temp file with a hard link to a sensitive file
https://www.cve.org/CVERecord?id=CVE-2003-1366

File Processing

File or Directory

UNIX hard link

FIO05-C
Identify files using multiple file attributes

SFP18
Link in resource name resolution

Allowed
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.
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.

PLOVER
2006-07-19
Draft 3
2006-07-19

Eric Dalci
Cigital
2008-07-01
updated Time_of_Introduction

CWE Content Team
MITRE
2008-09-08
updated Applicable_Platforms, Relationships, Taxonomy_Mappings, Weakness_Ordinalities

CWE Content Team
MITRE
2008-10-14
updated Description

CWE Content Team
MITRE
2008-11-24
updated Relationships, Taxonomy_Mappings

CWE Content Team
MITRE
2011-06-01
updated Common_Consequences

CWE Content Team
MITRE
2011-09-13
updated Relationships, Taxonomy_Mappings

CWE Content Team
MITRE
2012-05-11
updated Observed_Examples, References, Relationships

CWE Content Team
MITRE
2012-10-30
updated Potential_Mitigations

CWE Content Team
MITRE
2014-07-30
updated Relationships, Taxonomy_Mappings

CWE Content Team
MITRE
2017-11-08
updated Applicable_Platforms, Causal_Nature, Observed_Examples, Relationships, Taxonomy_Mappings

CWE Content Team
MITRE
2020-02-24
updated Relationships

CWE Content Team
MITRE
2022-04-28
updated Research_Gaps

CWE Content Team
MITRE
2022-10-13
updated Observed_Examples

CWE Content Team
MITRE
2023-01-31
updated Description

CWE Content Team
MITRE
2023-04-27
updated Relationships

CWE Content Team
MITRE
2023-06-29
updated Mapping_Notes

CWE Content Team
MITRE
2023-10-26
updated Observed_Examples

CWE Content Team
MITRE
2024-07-16
4.15
2024-07-16
updated Observed_Examples

CWE Content Team
MITRE
2025-09-09
4.18
2025-09-09
updated Affected_Resources, Functional_Areas

CWE Content Team
MITRE
2025-12-11
4.19
2025-12-11
updated Applicable_Platforms