Execution of a binary from a relative path can be controlled by an external actor
Command with relative path is vulnerable to malicious attack
Description
This defect occurs when you call an external command with a relative path or without a path.
This defect also finds results that the Execution of externally controlled command defect checker finds.
Risk
By using a relative path or no path to call an external command, your program uses an unsafe search process to find the command. An attacker can control the search process and replace the intended command with a command of their own.
Fix
When you call an external command, specify the full path.
Examples
Result Information
Group: Security |
Language: C | C++ |
Default: Off |
Command-Line Syntax: RELATIVE_PATH_CMD |
Impact: Medium |
Version History
Introduced in R2015b
See Also
Load of library from a relative path can be controlled by an external actor
| Vulnerable path manipulation
| Execution of externally controlled command
| Command executed from externally controlled path
| Find defects (-checkers)
Topics
- Interpret Bug Finder Results in Polyspace Desktop User Interface
- Interpret Bug Finder Results in Polyspace Access Web Interface (Polyspace Access)
- Address Results in Polyspace User Interface Through Bug Fixes or Justifications
- Address Results in Polyspace Access Through Bug Fixes or Justifications (Polyspace Access)