CWE-62: UNIX Hard Link

What is CWE-62?

CWE-62 is UNIX Hard Link. The flaw arises when 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. The database currently holds 2 vulnerabilities mapped to CWE-62 and none of them are in the CISA Known Exploited Vulnerabilities catalog.

OWASP Top 10 Rank-
Related CVES (365 days)2
AbstractionVariant
Likelihood of exploit-

Vulnerabilities mapped to CWE-62

2 vulnerabilitiesNo change year over year

No data

No vulnerability data in CISA KEV for CWE-62

Official definition

ByMitre CWE

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.

Characteristics

Modes of introduction

  • Implementation

Common consequences

ImpactScopeExplanation
Read Files or Directories, Modify Files or DirectoriesConfidentiality, IntegrityAn 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.

Risk mitigations

  1. Separation of Privilege · Architecture and DesignFollow 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.

Representative vulnerabilities

Sources (2)

CWE™ Program, operated by The MITRE Corporation. Copyright © 2006–2026, The MITRE Corporation. The MITRE Corporation hereby grants you a non-exclusive, royalty-free license to use CWE for research, development, and commercial purposes. CWE Terms of Use.

Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.