CWEweakness

CWE-65 Windows Hard Link

Official page ↗
Abstraction
Variant
Structure
Simple
Status
Incomplete
Languages
Not Language-Specific
CWE version
5.0

Description

The product, when opening a file or directory, does not sufficiently handle 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.

Common consequences

• Confidentiality, Integrity: Read Files or Directories, Modify Files or Directories — 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. AUTOEXEC.BAT). When the process opens the file, the attacker can assume the privileges of that process, or prevent the program from accurately processing data.

Potential mitigations

• [Architecture and Design] 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-2002-0725: Chain: File system allows local attackers to hide file usage activities via a hard link (CWE-65) to the target file, which causes the link to be recorded in the audit trail instead of the target file (CWE-221). • CVE-2003-0844: Web server plugin allows local users to overwrite arbitrary files via a symlink attack on predictable temporary filenames.

Related

Observed example · CVE (2)

  • CVE-2003-0844 mod_gzip 1.3.26.1a and earlier, and possibly later official versions, when running in debug mode without the Apache log, allows local users… vulnerability
  • CVE-2002-0725 NTFS file system in Windows NT 4.0 and Windows 2000 SP2 allows local attackers to hide file usage activities via a hard link to the target… vulnerability

Child of · CWE (1)

  • CWE-59 Improper Link Resolution Before File Access weakness

Referenced by CVE · weakness (7)

  • CVE-2026-70019 Windows hard link in Windows Compressed Folder allows an unauthorized attacker to disclose information over a network. vulnerability
  • CVE-2022-23742 Check Point Endpoint Security Client for Windows versions earlier than E86.40 copy files for forensics reports from a directory with low… vulnerability
  • CVE-2020-6013 ZoneAlarm Firewall and Antivirus products before version 15.8.109.18436 allow an attacker who already has access to the system to execute… vulnerability
  • CVE-2019-19231 An insecure file access vulnerability exists in CA Client Automation 14.0, 14.1, 14.2, and 14.3 Agent for Windows that can allow a local… vulnerability
  • CVE-2019-8454 A local attacker can create a hard-link between a file to which the Check Point Endpoint Security client for Windows before E80.96 writes… vulnerability
  • CVE-2019-8452 A hard-link created from log file archive of Check Point ZoneAlarm up to 15.4.062 or Check Point Endpoint Security client for Windows… vulnerability
  • CVE-2019-8455 A hard-link created from the log file of Check Point ZoneAlarm up to 15.4.062 to any file on the system will get its permission changed so… vulnerability

Referenced by OWASP · mapped cwe (1)

  • A01:2025 Broken Access Control Top 10 2025