---
title: "CWE-62: UNIX Hard Link"
url: https://radicalnotion.ai/cwe/cwe-62
type: cwe
description: "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."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-62: UNIX Hard Link

- **Abstraction:** Variant
- **Structure:** Simple
- **Status:** Incomplete
- **CVEs with this as primary weakness:** 4
- **Of those, in CISA KEV:** 0
- **New in 2026:** 2
- **CWE catalog version:** 4.21

## Description

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.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |

## Applicable platforms

**Operating systems:** Unix (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality, Integrity | Read Files or Directories, Modify Files or Directories | 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. |

## Potential mitigations

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

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2001-1494 | Hard link attack, file overwrite; interesting because program checks against soft links |
| CVE-2002-0793 | Hard link and possibly symbolic link following vulnerabilities in embedded operating system allow local users to overwrite arbitrary files. |
| 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. |
| 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. |
| CVE-2004-1603 | Web hosting manager follows hard links, which allows local users to read or modify arbitrary files. |
| CVE-2004-1901 | Package listing system allows local users to overwrite arbitrary files via a hard link attack on the lockfiles. |
| 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. |
| CVE-2005-1111 | Hard link race condition |
| 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. |
| 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 |

## Real CVEs with this weakness

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2024-54189 | Parallels Desktop prl\_disp\_service Snapshots.xml Hard Link Privilege Escalation | high | 7.8 | - | No | 2025-06-03 |
| CVE-2024-36486 | Parallels Desktop prl\_vmarchiver Unarchive Hard Link Privilege Escalation | high | 7.8 | - | No | 2025-06-03 |
| CVE-2026-109518 | APT RCE via hard link reuse | high | 7.7 | - | No | 2026-11-04 |
| CVE-2026-112934 | filelock: SoftReadWriteLock holder refresh writes through a hard link and hangs on a named pipe that another local user renames over its record | medium | 6.1 | - | No | 2026-10-20 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-59](https://radicalnotion.ai/cwe/cwe-59) | Improper Link Resolution Before File Access |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | UNIX hard link | - | - |
| CERT C Secure Coding | Identify files using multiple file attributes | FIO05-C | - |
| Software Fault Patterns | Link in resource name resolution | SFP18 | - |

## Frequently asked questions

### What is CWE-62?

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.

### What CVEs are caused by CWE-62?

4 recorded CVEs are attributed to CWE-62, including CVE-2024-54189, CVE-2024-36486 and CVE-2026-109518.

### How do you prevent CWE-62?

Follow the principle of least privilege when assigning access rights to entities in a software system.

### What are the consequences of CWE-62?

Exploiting CWE-62 can lead to: Read Files or Directories, Modify Files or Directories.

### Is CWE-62 actively exploited?

4 recorded CVEs are caused by CWE-62; none are currently in CISA's KEV catalog of actively exploited flaws.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/62.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-62). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
