PyDrive2 is a wrapper library of google-api-python-client that simplifies many common Google Drive API V2 tasks. Unsafe YAML deserilization will result in arbitrary code execution. A maliciously crafted YAML file can cause arbitrary code execution if PyDrive2 is run in the same directory as it, or if it is loaded in via LoadSettingsFile
. This is a deserilization attack that will affect any user who initializes GoogleAuth from this package while a malicious yaml file is present in the same directory. This vulnerability does not require the file to be directly loaded through the code, only present. This issue has been addressed in commit c57355dc
which is included in release version 1.16.2
. Users are advised to upgrade. There are no known workarounds for this vulnerability.
The product deserializes untrusted data without sufficiently verifying that the resulting data will be valid.
Name | Vendor | Start Version | End Version |
---|---|---|---|
Pydrive2 | Iterative | * | 1.16.2 (excluding) |
Pydrive2 | Iterative | 1.17.0 (including) | 1.17.0 (including) |
Pydrive2 | Ubuntu | bionic | * |
Pydrive2 | Ubuntu | lunar | * |
Pydrive2 | Ubuntu | mantic | * |
Pydrive2 | Ubuntu | trusty | * |
Pydrive2 | Ubuntu | xenial | * |
It is often convenient to serialize objects for communication or to save them for later use. However, deserialized data or code can often be modified without using the provided accessor functions if it does not use cryptography to protect itself. Furthermore, any cryptography would still be client-side security – which is a dangerous security assumption. Data that is untrusted can not be trusted to be well-formed. When developers place no restrictions on “gadget chains,” or series of instances and method invocations that can self-execute during the deserialization process (i.e., before the object is returned to the caller), it is sometimes possible for attackers to leverage them to perform unauthorized actions, like generating a shell.