encyclopegia.org

Path traversal attack

A directory traversal, path traversal, or dot-dot-slash attack exploits insufficient security validation or sanitization of user-supplied file names, such that characters representing "traverse to parent directory" are passed through to the operating system's file system API.[src] An affected application can be exploited to gain unauthorized access to the file system.[src]

A directory traversal, path traversal, or dot-dot-slash attack exploits insufficient security validation or sanitization of user-supplied file names, such that characters representing "traverse to parent directory" are passed through to the operating system's file system API.[src] An affected application can be exploited to gain unauthorized access to the file system.[src] An attack against this system could be to send the following HTTP request: GET /vulnerable.php HTTP/1.0 Cookie: TEMPLATE=../../../../../../../../../etc/passwd The server would then generate a response such as: HTTP/1.0 200 OK Content-Type: text/html Server: Apache root:fi3sED95ibqR6:0:1:System Operator:/:/bin/ksh daemon:*:1:1::/tmp: phpguru:f8fk3j1OIf31.:182:100:Developer:/home/users/phpguru/:/bin/csh The repeated ../ characters after /home/users/phpguru/templates/ have caused include() to traverse to the root directory, and then include the Unix password file /etc/passwd .[src] Unix /etc/passwd is a common file used to demonstrate directory traversal, as it is often used by crackers to try cracking the passwords.[src] However, in more recent Unix systems, the /etc/passwd file does not contain the hashed passwords, and they are instead located in the /etc/shadow file, which cannot be read by unprivileged users on the machine.[src] Even in that case, though, reading /etc/passwd does still show a list of user accounts, which could then become a starting point for further attacks.[src] The user can use the NULL character (indicating the end of the string) in order to bypass everything after the $_GET .[src] (This is PHP-specific.)[src]

10 sentences · 10 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Path traversal attack." encyclopegia.org, 2026, https://encyclopegia.org/wiki/path-traversal-attack. Accessed 27 November 2026.

Chicago

"Path traversal attack." encyclopegia.org. Accessed November 27, 2026. https://encyclopegia.org/wiki/path-traversal-attack.

APA

encyclopegia.org. (2026). Path traversal attack. Retrieved November 27, 2026, from https://encyclopegia.org/wiki/path-traversal-attack

Accessed November 27, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

2-Headed Shark Attack

stub · references available

Zombie Attack

stub · references available

Open Shortest Path First

stub · references available

On the Path

stub · references available

Owen Sound Attack

stub · references available

Stonewall Attack

stub · references available

Ansbach school attack

stub · references available

free-space path loss

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1376735429 · 0.5 · snapshot enwiki-001376735429

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.