RUSTSEC-2017-0004

Source
https://rustsec.org/advisories/RUSTSEC-2017-0004
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2017-0004.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2017-0004
Aliases
Published
2017-05-03T12:00:00Z
Modified
2023-11-08T03:58:46.425555Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Integer overflow leads to heap-based buffer overflow in encode_config_buf
Details

Affected versions of this crate suffered from an integer overflow bug when calculating the size of a buffer to use when encoding base64 using the encode_config_buf and encode_config functions. If the input string was large, this would cause a buffer to be allocated that was too small. Since this function writes to the buffer using unsafe code, it would allow an attacker to write beyond the buffer, causing memory corruption and possibly the execution of arbitrary code.

This flaw was corrected by using checked arithmetic to calculate the size of the buffer.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / base64

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.5.2

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [],
        "arch": []
    }
}

Database specific

{
    "cvss": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
    "informational": null,
    "categories": []
}