Synopsis
Tenable Research has identified and responsibly disclosed a critical Remote Code Execution (RCE) vulnerability in Looker. This vulnerability allowed a malicious actor with developer-level access to the platform to execute arbitrary code on the underlying Looker instance.
This complex attack chained together multiple flaws to achieve RCE. The primary vulnerability stemmed from improper handling of remote dependencies in LookML project manifests (manifest.lkml).
Path Traversal: An attacker could inject a path traversal sequence (../) into the remote_dependency name, which was used to set the hooksPath in the Looker project's Git configuration file (.git/config). This allowed the attacker to point the Git hooks directory to an arbitrary location on the file system.
Arbitrary Directory Creation and Override: The remote_dependency configuration also allowed an attacker to create arbitrary directories. By manipulating the ref parameter, an attacker could create a custom git_hooks directory and override the project's .git/config file.
Race Condition: The attacker then exploited a race condition between a legitimate Git commit operation and the malicious file write. This allowed the attacker to trigger a Git hook from their controlled location before the system could overwrite the malicious configuration, leading to the execution of the malicious code.
By chaining these flaws, an attacker could force Looker to execute commands contained within a Git hook file. This granted them full control over the Looker instance, which could lead to data exfiltration, service disruption, and further compromise of the cloud environment
Solution
Google has fixed the issue.
Disclosure Timeline
All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.
Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.
For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.
If you have questions or corrections about this advisory, please email [email protected]