Python

Python : Injection Wildcard

Classification

OWASP Top 10 2013
OWASP Top 10 2017
OWASP Top 10 2021

Overview

Python provides a number of methods that emulate the behavior of standard Linux command line utilities. Like their Linux counterparts, these commands may take a wildcard “\*” character in place of a file system path. This is interpreted to mean “any and all files or folders” and can be used to build partially qualified paths, such as “/home/user/\*”.

The use of partially qualified paths may result in unintended consequences if an unexpected file or symlink is placed into the path location given. This becomes particularly dangerous when combined with commands used to manipulate file permissions or copy data off of a system.

It is especially dangerous to use of the following commands in conjunction with wild card parameters:

  • chown
  • chmod
  • tar
  • rsync
CRITICAL

DerScanner Severity Score

Check your Python code for this vulnerability, free

Request a free pilot of DerScanner. We give you access and help with the first scan. It works in the cloud and on-premise.

Try it on your code, free

By submitting this form, I acknowledge that DerScanner may process my personal data I provided above for purposes explained above. More details about the processing.