CVE-2019-16881
Use after free in portaudio-rs
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
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.
- Record
CVE-2019-16881- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 7.5 High
AV:N/AC:L/Au:N/C:P/I:P/A:P - Weakness
- CWE-416
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2019-16881- Updated
- 2026-11-02
EUVDEUVD-2021-1848 No score
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.
- Record
EUVD-2021-1848- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-qpjr-ch72-2qq4
9.8
Use after free in portaudio-rs
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 .
- Record
GHSA-qpjr-ch72-2qq4- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
OSVGHSA-qpjr-ch72-2qq4
9.8
Use after free in portaudio-rs
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 .
- Record
GHSA-qpjr-ch72-2qq4- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-416
- Updated
- 2026-11-02
OSVRUSTSEC-2019-0022
9.8
Stream callback function is not unwind safe
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 .
The flaw was reported by Phosphorus15.
- Record
RUSTSEC-2019-0022- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
portaudio-rscrates.io |
before 0.3.2 | 0.3.2 |
portaudio-rscrates.io |
0.0.0-0 up to 0.3.2-0 | 0.3.2-0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2019-16881 is a critical vulnerability (CVSS 9.8) in Portaudio-rs Project Portaudio-rs, published September 14, 2019. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.51%, the 84th percentile. Fixed in portaudio-rs 0.3.2.
References
rustsec.org/advisories/RUSTSEC-2019-0022.html
nvd.nist.gov/vuln/detail/CVE-2019-16881
github.com/mvdnes/portaudio-rs/issues/20
github.com/mvdnes/portaudio-rs/commit/7466df019f6739732fd91401017942c22364ef61
github.com/advisories/GHSA-qpjr-ch72-2qq4
github.com/mvdnes/portaudio-rs
crates.io/crates/portaudio-rs