-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
The fix of #issue399 (RCE from prompt) can be bypassed. #410
Comments
ุฃูุง ุขุณู ุฌุฏุง ุฌุฏุง |
ุฃูุง ุขุณู |
ูุงููู ุขูู ูุฃ ุงุฌูุฏ ุงููุฑุงุกุฉ ุฌูุฏุง |
#ูุงููู ุขูู ูุฃุฌูุฏ ุงููุฑุงุกุฉ ุฌูุฏุง |
๐ Describe the bug
Hi Team!
In
pandasai 0.8.1
, despite there is a syntax-level fix to #399, it seems that this fix does not work as intended, and although the PoC mentioned in #399 is no longer attackable, it only filters__builtins__
and the rest does not seem to be filtered as intended, e.g.,__subclasses__
, which is probably related to the structure of the abstract syntax tree.To summarize, we can still achieve RCE by making changes to the PoC, as follows:
Now, in this PoC, we just replace
__builtins__['str']
to''
then we bypass the check. Maybe in the function_is_jailbreak
,if isinstance(child, ast.Name) and child.id in DANGEROUS_BUILTINS:
is not enough. But I did not dive into to see what's the root cause.Thanks!
The text was updated successfully, but these errors were encountered: