-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-68966: Document mailcap shell injection vulnerability #92024
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
Conversation
As discussed on the (private) Python Security Response Team, we can simply document the shell command injection vulnerability in the mailcap documentation, as we did for other vulnerabilities:
The Python documentation now even has a list of dangerous APIs / known vulnerabilities: https://docs.python.org/dev/library/security_warnings.html It seems like there is no simple way to fix the #68966 vulnerability without changing the behavior for legit filenames. |
Doc/library/mailcap.rst
Outdated
design, the mailcap format uses shell commands. The caller is responsible to | ||
validate the filename. The caller can create temporary filename, using |
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.
It's not only about the filename. The MIME type and parameter list need to be validated as well.
Also, how should they be validated? That's not clear.
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.
You're right, I rephrased the warning.
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.
"The caller is responsible to validate and sanitize input arguments."
Co-authored-by: Jelle Zijlstra <[email protected]>
#91993 got merged, I close this issue. |
No description provided.