{"id":"CVE-2019-16881","aliases":["CVE-2019-16881","GHSA-qpjr-ch72-2qq4","RUSTSEC-2019-0022"],"related":[],"kind":"vulnerability","state":"published","title":"Use after free in portaudio-rs","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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 .","format":"markdown","source":"ghsa"},{"lang":"en","text":"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.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se detectó un problema en el paquete (crate) portaudio-rs versiones hasta 0.3.1 para Rust. Se presenta un uso de la memoria previamente liberada con una ejecución de código arbitraria resultante debido a la falta de seguridad del desempaquetado en las funciones stream_callback y stream_finished_callback.","source":"nvd"}],"published":"2019-09-14T12:00:00.000Z","modified":"2026-06-17T02:22:53.577Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.3.2"}],"ecosystem":"crates.io","package":"portaudio-rs","purl":"pkg:cargo/portaudio-rs","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.3.2-0"}],"ecosystem":"crates.io","package":"portaudio-rs","purl":"pkg:cargo/portaudio-rs","source":"rustsec"},{"ranges":[{"status":"affected","lastAffected":"0.3.1"}],"vendor":"portaudio-rs_project","product":"portaudio-rs","cpe":"cpe:2.3:a:portaudio-rs_project:portaudio-rs:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2019-0022.html","tags":["advisory","exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2019-16881","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/mvdnes/portaudio-rs/issues/20","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/mvdnes/portaudio-rs/commit/7466df019f6739732fd91401017942c22364ef61","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/mvdnes/portaudio-rs","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/portaudio-rs","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2019-16881","url":"https://www.cve.org/CVERecord?id=CVE-2019-16881","licence":"CVE Terms of Use","modified":"2024-08-05T01:24:47.982Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qpjr-ch72-2qq4","url":"https://github.com/advisories/GHSA-qpjr-ch72-2qq4","licence":"CC-BY-4.0","modified":"2023-11-08T04:01:22.139Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2019-0022","url":"https://rustsec.org/advisories/RUSTSEC-2019-0022.html","licence":"CC0-1.0","modified":"2023-11-08T04:01:22.139Z"},{"source":"nvd","name":"NVD","id":"CVE-2019-16881","url":"https://nvd.nist.gov/vuln/detail/CVE-2019-16881","licence":"Public domain","modified":"2026-06-17T02:22:53.577Z"}],"updatedAt":"2026-11-25T22:57:47.107Z","epss":{"score":0.02506,"percentile":0.85184,"date":"2026-12-01T12:00:22.000Z"}}