{"id":"CVE-2017-1000430","aliases":["EUVD-2021-1929","GHSA-x67x-vg9m-65c3","RUSTSEC-2017-0004"],"status":"published","title":"Integer overflow in base64","description":"rust-base64 version \u003c= 0.5.1 is vulnerable to a buffer overflow when calculating the size of a buffer to use when encoding base64 using the 'encode_config_buf' and 'encode_config' functions","severity":{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-09","score":0.01534,"percentile":0.75006,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-119"],"published":"2017-05-03T12:00:00Z","modified":"2026-10-24T10:31:03Z","fixes":[{"ecosystem":"crates.io","package":"base64","fixed_in":["0.5.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"base64","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.5.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"base64","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.5.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"base64","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.5.2"}]}]}],"products":[{"vendor":"rust-base64_project","product":"rust-base64"}],"references":[{"url":"https://github.com/RustSec/advisory-db/blob/master/crates/base64/RUSTSEC-2017-0004.toml","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2017-1000430","tags":["advisory"]},{"url":"https://github.com/alicemaz/rust-base64/commit/24ead980daf11ba563e4fb2516187a56a71ad319","tags":["web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2017-0004.html","tags":["web","advisory"]},{"url":"https://github.com/advisories/GHSA-x67x-vg9m-65c3"},{"url":"https://github.com/alicemaz/rust-base64","tags":["package"]},{"url":"https://crates.io/crates/base64","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2017-1000430","description":"rust-base64 version \u003c= 0.5.1 is vulnerable to a buffer overflow when calculating the size of a buffer to use when encoding base64 using the 'encode_config_buf' and 'encode_config' functions","status":"published","published":"2018-01-02T20:00:00Z","modified":"2024-09-17T01:26:29.036Z","updated_at":"2026-11-02T14:33:20.843976Z"}],"euvd":[{"id":"EUVD-2021-1929","description":"rust-base64 version \u003c= 0.5.1 is vulnerable to a buffer overflow when calculating the size of a buffer to use when encoding base64 using the 'encode_config_buf' and 'encode_config' functions","status":"published","published":"2018-01-02T20:00:00Z","modified":"2024-09-17T01:26:29Z","updated_at":"2026-11-03T00:28:49.824577Z"}],"ghsa":[{"id":"GHSA-x67x-vg9m-65c3","title":"Integer overflow in base64","description":"Affected versions of this crate suffered from an integer overflow bug when\ncalculating the size of a buffer to use when encoding base64 using the\n`encode_config_buf` and `encode_config` functions.  If the input string\nwas large, this would cause a buffer to be allocated that was too small.\nSince this function writes to the buffer using unsafe code, it would\nallow an attacker to write beyond the buffer, causing memory corruption\nand possibly the execution of arbitrary code.\n\nThis flaw was corrected by using checked arithmetic to calculate\nthe size of the buffer.\n","status":"published","published":"2021-08-25T20:55:27Z","modified":"2023-01-11T05:05:38Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-119"],"updated_at":"2026-11-02T14:36:12.361159Z"}],"nvd":[{"id":"CVE-2017-1000430","description":"rust-base64 version \u003c= 0.5.1 is vulnerable to a buffer overflow when calculating the size of a buffer to use when encoding base64 using the 'encode_config_buf' and 'encode_config' functions","status":"published","published":"2018-01-02T20:29:00.313Z","modified":"2026-06-17T00:59:09.897Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-119"],"updated_at":"2026-11-02T14:04:11.215487Z"}],"osv":[{"id":"CVE-2017-1000430","description":"rust-base64 version \u003c= 0.5.1 is vulnerable to a buffer overflow when calculating the size of a buffer to use when encoding base64 using the 'encode_config_buf' and 'encode_config' functions","status":"published","published":"2018-01-02T20:29:00.313Z","modified":"2026-10-24T10:31:03.793651406Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:03.851821Z"},{"id":"GHSA-x67x-vg9m-65c3","title":"Integer overflow in base64","description":"Affected versions of this crate suffered from an integer overflow bug when\ncalculating the size of a buffer to use when encoding base64 using the\n`encode_config_buf` and `encode_config` functions.  If the input string\nwas large, this would cause a buffer to be allocated that was too small.\nSince this function writes to the buffer using unsafe code, it would\nallow an attacker to write beyond the buffer, causing memory corruption\nand possibly the execution of arbitrary code.\n\nThis flaw was corrected by using checked arithmetic to calculate\nthe size of the buffer.\n","status":"published","published":"2021-08-25T20:55:27Z","modified":"2023-11-08T03:58:46.425555Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-119"],"updated_at":"2026-11-02T15:46:59.484835Z"},{"id":"RUSTSEC-2017-0004","title":"Integer overflow leads to heap-based buffer overflow in encode_config_buf","description":"Affected versions of this crate suffered from an integer overflow bug when\ncalculating the size of a buffer to use when encoding base64 using the\n`encode_config_buf` and `encode_config` functions.  If the input string\nwas large, this would cause a buffer to be allocated that was too small.\nSince this function writes to the buffer using unsafe code, it would\nallow an attacker to write beyond the buffer, causing memory corruption\nand possibly the execution of arbitrary code.\n\nThis flaw was corrected by using checked arithmetic to calculate\nthe size of the buffer.","status":"published","published":"2017-05-03T12:00:00Z","modified":"2023-11-08T03:58:46.425555Z","cvss":[{"version":"3.0","score":9.8,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:53:39.492624Z"}]}}
