Arbitrary File Access Vulnerability in rust-webbrowser Package
Summary
CVE-2022-45299: An issue in the IpFile argument of rust-lang webbrowser-rs v0.8.2 allows attackers to access arbitrary files via supplying a crafted URL. Affects rust-webbrowser across 2 version ranges.
< 0.8.7-1
< 3787624653211d59a4c8e7cdddf2b2e04fdae3e6
Fixed in 0.8.7-1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The rust-webbrowser package is a Rust library that provides a simple interface for opening web browsers. It is commonly used in applications that require web-based interactions. The package is designed to be lightweight and easy to integrate, making it a popular choice among developers. However, a vulnerability has been identified in version 0.8.2, which allows attackers to exploit the IpFile argument to access arbitrary files on the server, posing a significant security risk.
Vulnerability Detail
The vulnerability arises from improper handling of the IpFile argument in the rust-lang webbrowser-rs library version 0.8.2. By supplying a crafted URL, an attacker can manipulate the application to access files outside of the intended directory. This can lead to unauthorized access to sensitive information, including configuration files, user data, and other critical resources. The vulnerability has a CVSS score of 9.8, indicating a high severity level, and it affects both Debian and GitHub repositories of the package.
How To Fix
Minimum fixed version
0.8.7-1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade rust-webbrowser
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, avoid using the IpFile argument in your application until the package is updated. Additionally, implement input validation to sanitize URLs before processing them, which can help mitigate the risk of file access vulnerabilities.
Conclusion
The rust-webbrowser package has a critical vulnerability that allows arbitrary file access through a crafted URL. It is essential for users to upgrade to the latest version to mitigate this risk. Temporary workarounds can be implemented, but the best course of action is to apply the fix as soon as possible.
See every vulnerability recorded for rust-webbrowser →
FAQ
The vulnerability allows attackers to access arbitrary files on the server by supplying a crafted URL, which can lead to unauthorized data exposure.
The vulnerability affects rust-webbrowser version 0.8.2. It is recommended to upgrade to version 0.8.7-1 or later.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The CVSS score of this vulnerability is 9.8, indicating a high severity level.
If you cannot upgrade immediately, avoid using the IpFile argument and implement input validation to sanitize URLs.
Related vulnerabilities
Recent vulnerabilities recorded for rust-webbrowser.