Join our Newsletter — 33% off our NHI Course
Home› Glossary› Cyber Security› Hard Link
Cyber Security

Hard Link

← Back to Glossary
By NHI Mgmt Group Updated October 17, 2026 Domain: Cyber Security

A hard link is a filesystem entry that points directly to the same underlying file data as another name. It can complicate deletion, access control, and forensic analysis, so defenders should understand link semantics, restrict privileged file manipulation, and monitor for unexpected hard links.

A hard link is not a copy of a file. It is another directory entry for the same underlying file data, which means the file’s contents, metadata changes, and deletion behavior can differ from what casual file browsing suggests.

This matters because the filesystem is tracking a shared inode or equivalent object behind multiple names. If one path is removed, the data can remain available through another link, which makes assumptions about “deleted” files, storage recovery, and cleanup less reliable.

Hard links can blur ownership boundaries when administrators or applications assume that a pathname uniquely identifies a file. That creates risk around file retention, tampering, and access review, especially where privileged processes manipulate files in shared directories or temporary locations.

They also complicate investigations. A file that appears absent from one path may still exist elsewhere, and a change through any linked name affects the same data object. That can mislead responders who rely on directory listings alone.

Deletion removes a name, not necessarily the data object itself. The data persists until the last hard link is removed, so “deleted” can mean “no longer visible at this path” rather than “securely gone.”

Access control is similarly path-sensitive. If an attacker or misconfigured process can create or place hard links in sensitive locations, they may preserve access to data longer than expected or manipulate workflows that trust file names more than file identity. Defensive file handling should treat the underlying object, not just the visible path, as the security boundary.

For a defensive reference on filesystem-related detection and hardening techniques, see the MITRE D3FEND Guide.

Defender Visibility and Forensic Implications

Hard links are important in forensics because they can preserve access to content after one path is deleted or renamed. That means incident handlers should check link counts, inode reuse, and alternate references before concluding that a file has been removed from the system.

They also affect monitoring design. Detection logic that only watches file creation or deletion events at the pathname level can miss activity if the underlying object is reused through another link. Analysts need to correlate file metadata, permissions, and process activity to understand what actually changed.

For mapping these filesystem behaviors to broader weakness patterns, the CWE Top 25 Guide is a useful companion for understanding how file handling flaws and insecure permission handling fit into a wider weakness model.

Risk and Threat Considerations

Hard links become risky when security decisions depend on the pathname instead of the underlying file object. That can create retention failures, privilege confusion, and forensic blind spots, especially if privileged software processes untrusted directories or temporary files.

Failure mechanism: A process or attacker exploits the gap between visible names and shared file identity, so deletion, inspection, or policy enforcement applies to one link while the same data remains reachable through another.

Impact: Sensitive data can persist longer than expected, evidence can be misread or missed, and access-control assumptions can fail in ways that are difficult to spot after the fact.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

CIS Controls v8, NIST SP 800-53 Rev 5 and OWASP ASVS set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
CIS Controls v8CIS-5 — Account ManagementHard link abuse often hinges on file access and privileged file handling controls.
Recommendation — Enforce least privilege and review file-handling permissions to limit unsafe link creation.
NIST SP 800-53 Rev 5AC-6 — Least PrivilegeRestricts who can manipulate files in ways that alter access or deletion behavior.
AU-2 — Event LoggingFile creation, deletion, and metadata changes need audit visibility to spot link-based abuse.
Recommendation — Apply least-privilege access so only approved processes can create or preserve sensitive links. Log file and metadata activity so alternate references and unexpected deletions are detectable.
ISO/IEC 27001:2022A.8.9 — Configuration managementHard link risk is reduced when file-system and permission settings are controlled and reviewed.
Recommendation — Standardize and review filesystem settings that affect linking, ownership, and deletion behavior.
OWASP ASVSV5 — File HandlingFile-handling requirements cover safe treatment of file objects, metadata, and path-based assumptions.
Recommendation — Verify file-handling logic does not trust pathname alone when enforcing security decisions.

Practitioner Guidance

Why practitioners should care: File operations should be designed around the object model of the filesystem, not just the pathname model. Where software handles sensitive files, the ability to create or preserve alternate links can materially change the trust boundary.

What to watch for: Unexpected link counts, files that remain reachable after “deletion,” and privileged workflows that accept user-influenced paths are all signals that hard link semantics may be affecting security posture.

Where filesystem hardening is part of the control objective, CIS Benchmarks provide a practical baseline for reducing exposure through stronger system configuration and file-permission discipline.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 17, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org