Arbitrary Code Execution in speaches-ai speaches
A vulnerability in the PyannoteDiarizationModelManager._load_fn function of the speaches-ai speaches library allows remote attackers to perform arbitrary code execution via malicious input.
CVE search metadata
CVE search record: CVE-2026-112145. Severity: high. CVSS: 7.3. KEV: no. Product: speaches (<= 0.9.0-rc.3). Brief: Arbitrary Code Execution in speaches-ai speaches. Brief link: https://feed.craftedsignal.io/briefs/2026-10-speaches-vulnerability/
The speaches-ai speaches library, specifically versions up to and including 0.9.0-rc.3, contains a critical vulnerability in the PyannoteDiarizationModelManager._load_fn function within src/speaches/executors/pyannote_diarization.py. The issue arises from the insecure handling of the 'model' argument, which allows an attacker to supply externally-controlled input that is used to select classes or code for execution. This vulnerability, introduced in PR #628 (commit 870e1e16a73452496e99d49f759eabd692a8e0e0), enables remote code execution. As the exploit is publicly disclosed and the maintainers have not yet provided a patch, users of the library are currently at risk of exploitation if their application exposes this diarization model loading functionality to unauthenticated or untrusted input.
Impact
Successful exploitation allows a remote, unauthenticated attacker to execute arbitrary code with the privileges of the application process. This can lead to full system compromise, data exfiltration, or lateral movement within the environment where the speaches-ai library is deployed. The vulnerability impacts any application leveraging the affected pyannote_diarization executor.
Recommendation
- Review all applications using speaches-ai speaches versions <= 0.9.0-rc.3 and identify instances where user-supplied input flows into the 'model' argument of PyannoteDiarizationModelManager._load_fn.
- Implement strict input validation or sandboxing for the 'model' parameter to prevent the loading of unauthorized or arbitrary classes.
- Monitor vendor repositories for a patched release and update speaches-ai speaches immediately once available.
- If updating is not currently possible, restrict access to the affected endpoint or functionality to trusted internal sources only.
Immediate actions
Inventory all services utilizing speaches-ai speaches library versions <= 0.9.0-rc.3.
Mitigations
Restrict access to API endpoints or user-facing features that invoke the affected pyannote_diarization executor.
CVE-2026-112145