Wednesday 02 December 2026 00:08:35 GMT+01:00

Netcrook

HomeManifesto
News
Techcrook
Geocrook
WikicrookTeamAppContact
EnglishItaliano

WIKICROOK

Canonical Path

The normalized file path used to verify that access stays inside an approved directory.

A canonical path is the fully normalized form of a file path. It resolves elements such as .., repeated separators, and sometimes symbolic links so the system can compare the real destination against an approved directory. Security code uses canonical paths to answer a simple question: “Is this file still inside the folder I meant to allow?”

This matters because path traversal attacks try to manipulate user-supplied paths so a program reads or writes outside its intended area. If software checks only the raw input, an attacker may escape the directory boundary. By converting the input to a canonical path first, defenders can enforce allowlists, block directory escape, and reduce the risk of unauthorized file access. Canonical-path checks are common in upload handlers, file transfer services, and sandboxed tools that handle sensitive data.

← WIKICROOK index