-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix code injection in extension_utils.py #61180
base: develop
Are you sure you want to change the base?
Conversation
Like _wget_download() now run_cmd() uses shlex for safe command parsing to fix arbitrary code injection.
|
People you are doing this wrong, you can't fix this issue like that. There is nothing you can do inside |
@ehtec @wanghuancoder Can you please review this? or suggest a way to fix this issue. Thanks. I am not sure about check failures. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前单测中用到了shell=True这种场景。如果要删掉shell=True。可以对command做一下字符串处理,将command split成多个参数。
@wanghuancoder #61285 is fixing this issue? |
Sorry to inform you that 2c308c0's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
PR types
Bug fixes
PR changes
OPs
Description
This uses shlex for safe command parsing to fix arbitrary code injection. This fixes the arbitrary code execution vulnerability using python stdlib tool shlex, which escapes the characters in the text and makes sure that any parsing does not happen inside a shell. Just like other fix for
_wget_download