CWE一覧に戻る
CWE-61

UNIX シンボリックリンク (Symlink) に続く

UNIX Symbolic Link (Symlink) Following
脆弱性 作成中
JA

本製品は、ファイルやディレクトリを開く際に、そのファイルがシンボリックリンクであり、意図した制御範囲外のターゲットに解決される場合を十分に考慮していません。このため、攻撃者が製品を不正なファイル上で動作させる可能性があります。

内部コードであれユーザー入力であれ、パスの一部としてUNIXシンボリックリンク(シンボリックリンク)を許可している製品では、攻撃者がシンボリックリンクを偽装し、ファイルシステムを意図しない場所までトラバースしたり、任意のファイルにアクセスしたりする可能性がある。シンボリックリンクにより、攻撃者は本来アクセス権限のないファイルを読み書きしたり、破壊したりすることができる。

EN

The product, when opening a file or directory, does not sufficiently account for when the file is a symbolic link that resolves to a target outside of the intended control sphere. This could allow an attacker to cause the product to operate on unauthorized files.

A product that allows UNIX symbolic links (symlink) as part of paths whether in internal code or through user input can allow an attacker to spoof the symbolic link and traverse the file system to unintended locations or access arbitrary files. The symbolic link can permit an attacker to read/write/corrupt a file that they originally did not have permissions to access.

Scope: Confidentiality, Integrity / Impact: Read Files or Directories; Modify Files or Directories
Symbolic link attacks often occur when a program creates a tmp directory that stores files/links. Access to the directory should be restricted to the program as to prevent attackers from manipulating the files.
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.
MITRE公式ページ — CWE-61