You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the vulnerability?
Passing user-supplied arguments to wordexp will cause command substitution which will cause command injection, leading to code execution.
How does the vulnerability work?
Unsanitised data is passed to a system/shell-like function.
What strategy do you use in your query to find the vulnerability? TaintTracking + RemoteFlowSource.
How have you reduced the number of false positives?
A call to wordexp is safe, if the WRDE_NOCMD flag is used. This flag disables command substitution.
This case has been modeled in the query.
I am currently not aware of other false positives, but will be running this query on lgtm.com and adjust the query accordingly to the results I see.
Query PR
github/codeql#10077
Language
C/C++
CVE(s) ID list
CVE-2022-3008
CWE
CWE-078
Report
Passing user-supplied arguments to
wordexpwill cause command substitution which will cause command injection, leading to code execution.Unsanitised data is passed to a
system/shell-like function.TaintTracking+RemoteFlowSource.A call to
wordexpis safe, if theWRDE_NOCMDflag is used. This flag disables command substitution.This case has been modeled in the query.
I am currently not aware of other false positives, but will be running this query on lgtm.com and adjust the query accordingly to the results I see.
This query was inspired by https://github.com/syoyo/tinygltf/issues/368 which has been found by oss-fuzz using ExecSan.
Are you planning to discuss this vulnerability submission publicly? (Blog Post, social networks, etc).
Blog post link
No response