CWE Database
/

CWE-243

Back to CWE list

CWE-243

Creation of chroot Jail Without Changing Working Directory

Variant
Draft

Description

The product uses the chroot() system call to create a jail, but does not change the working directory afterward. This does not prevent access to files outside of the jail.

Improper use of chroot() may allow attackers to escape from the chroot jail. The chroot() function call does not change the process's current working directory, so relative paths may still refer to file system resources outside of the chroot jail after chroot() has been called.

Common Consequences

Scope

Confidentiality

Impact

Read Files or Directories

Applicable Platforms

C
C++

Security Training

Train your team to recognize and prevent security threats with our comprehensive security awareness program.

Start Training

Vulnerability Scanning

Discover vulnerabilities in your applications and infrastructure before attackers do.

Scan Now