This project might be open to known security vulnerabilities, which can be prevented by tightening the version range of affected dependencies. Find detailed information at the bottom.
Affected versions of this crate did not require the buffer wrapped in BodyStream to be pinned,
but treated it as if it had a fixed location in memory. This may result in a use-after-free.
The flaw was corrected by making the trait MessageBody require Unpin
and making poll_next() function accept Pin<&mut Self> instead of &mut self.
chrono: Potential segfault in `localtime_r` invocations
Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.
Affected versions of this crate did not properly detect invalid requests that could allow HTTP/1 request smuggling (HRS) attacks when running alongside a vulnerable front-end proxy server. This can result in leaked internal and/or user data, including credentials, when the front-end proxy is also vulnerable.
Popular front-end proxies and load balancers already mitigate HRS attacks so it is recommended that they are also kept up to date; check your specific set up. You should upgrade even if the front-end proxy receives exclusively HTTP/2 traffic and connects to the back-end using HTTP/1; several downgrade attacks are known that can also expose HRS vulnerabilities.
rust-embed: RustEmbed generated `get` method allows for directory traversal when reading files from disk
When running in debug mode and the debug-embed (off by default) feature is
not enabled, the generated get method does not check that the input path is
a child of the folder given.
This allows attackers to read arbitrary files in the file system if they have
control over the filename given. The following code will print the contents of
your /etc/passwd if adjusted with a correct number of ../s depending on
where it is run from.
#[derive(rust_embed::RustEmbed)]
#[folder = "src/"]
pub struct Asset;
fn main() {
let d = Asset::get("../../../etc/passwd").unwrap().data;
println!("{}", String::from_utf8_lossy(&d));
}
The flaw was corrected by canonicalizing the input filename and ensuring that
it starts with the canonicalized folder path.