{"id":"CVE-2019-16881","aliases":["EUVD-2021-1848","GHSA-qpjr-ch72-2qq4","RUSTSEC-2019-0022"],"status":"published","title":"Use after free in portaudio-rs","description":"An issue was discovered in the portaudio-rs crate through 0.3.1 for Rust. There is a use-after-free with resultant arbitrary code execution because of a lack of unwind safety in stream_callback and stream_finished_callback.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/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-11","score":0.02506,"percentile":0.84949,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-416"],"published":"2019-09-14T12:00:00Z","modified":"2026-06-17T02:22:53Z","fixes":[{"ecosystem":"crates.io","package":"portaudio-rs","fixed_in":["0.3.2","0.3.2-0"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"portaudio-rs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.3.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"portaudio-rs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.3.2"}]}]},{"source":"osv","ecosystem":"crates.io","package":"portaudio-rs","ranges":[{"type":"SEMVER","events":[{"introduced":"0.0.0-0"},{"fixed":"0.3.2-0"}]}]}],"products":[{"vendor":"portaudio-rs_project","product":"portaudio-rs"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2019-0022.html","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Third Party Advisory","web","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2019-16881","tags":["advisory"]},{"url":"https://github.com/mvdnes/portaudio-rs/issues/20","tags":["web","report"]},{"url":"https://github.com/mvdnes/portaudio-rs/commit/7466df019f6739732fd91401017942c22364ef61","tags":["web"]},{"url":"https://github.com/advisories/GHSA-qpjr-ch72-2qq4"},{"url":"https://github.com/mvdnes/portaudio-rs","tags":["package"]},{"url":"https://crates.io/crates/portaudio-rs","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2019-16881","description":"An issue was discovered in the portaudio-rs crate through 0.3.1 for Rust. There is a use-after-free with resultant arbitrary code execution because of a lack of unwind safety in stream_callback and stream_finished_callback.","status":"published","published":"2019-09-25T16:45:21Z","modified":"2024-08-05T01:24:47.982Z","updated_at":"2026-11-02T14:32:23.485011Z"}],"euvd":[{"id":"EUVD-2021-1848","description":"An issue was discovered in the portaudio-rs crate through 0.3.1 for Rust. There is a use-after-free with resultant arbitrary code execution because of a lack of unwind safety in stream_callback and stream_finished_callback.","status":"published","published":"2019-09-25T16:45:21Z","modified":"2024-08-05T01:24:47Z","updated_at":"2026-11-03T02:40:31.903592Z"}],"ghsa":[{"id":"GHSA-qpjr-ch72-2qq4","title":"Use after free in portaudio-rs","description":"Affected versions of this crate is not panic safe within callback functions stream_callback and stream_finished_callback. The call to user-provided closure might panic before a mem::forget call, which then causes a use after free that grants attacker to control the callback function pointer. This allows an attacker to construct an arbitrary code execution .","status":"published","published":"2021-08-25T20:45:17Z","modified":"2023-06-13T20:35:07Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:36:54.225318Z"}],"nvd":[{"id":"CVE-2019-16881","description":"An issue was discovered in the portaudio-rs crate through 0.3.1 for Rust. There is a use-after-free with resultant arbitrary code execution because of a lack of unwind safety in stream_callback and stream_finished_callback.","status":"published","published":"2019-09-25T17:15:10.76Z","modified":"2026-06-17T02:22:53.577Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/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-416"],"updated_at":"2026-11-02T14:05:28.126831Z"}],"osv":[{"id":"GHSA-qpjr-ch72-2qq4","title":"Use after free in portaudio-rs","description":"Affected versions of this crate is not panic safe within callback functions stream_callback and stream_finished_callback. The call to user-provided closure might panic before a mem::forget call, which then causes a use after free that grants attacker to control the callback function pointer. This allows an attacker to construct an arbitrary code execution .","status":"published","published":"2021-08-25T20:45:17Z","modified":"2023-11-08T04:01:22.139199Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T15:46:54.760124Z"},{"id":"RUSTSEC-2019-0022","title":"Stream callback function is not unwind safe","description":"Affected versions of this crate is not panic safe within callback functions `stream_callback` and `stream_finished_callback`.\n\nThe call to user-provided closure might panic before a `mem::forget` call, which then causes a use after free that grants attacker to control the callback function pointer.\n\nThis allows an attacker to construct an arbitrary code execution .\n \nThe flaw was reported by Phosphorus15.","status":"published","published":"2019-09-14T12:00:00Z","modified":"2023-11-08T04:01:22.139199Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/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"}]}}
