Critical
Security advisory
Matrix libolm before 3.2.3 allows a malicious Matrix homeserver to crash a client (while it is attempting to retrieve an Olm encrypted room key backup from the homeserver) because olm_pk_decrypt has a stack-based buffer overflow. Remote code execution might be possible for some nonstandard build configurations.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-34813
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 12:37 UTC · Revision 1
Source evidence
Matrix libolm before 3.2.3 allows a malicious Matrix homeserver to crash a client (while it is attempting to retrieve an Olm encrypted room key backup from the homeserver) because olm_pk_decrypt has a stack-based buffer overflow. Remote code execution might be possible for some nonstandard build configurations.
osv:CVE-2021-34813
Complete source record
{
"id": "aef9a9da235bf6a381890bba45c3a239a75d9b0bc1b868ca5fe8b1324e65df57",
"url": "https://osv.dev/vulnerability/CVE-2021-34813",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-34813",
"summary": "Matrix libolm before 3.2.3 allows a malicious Matrix homeserver to crash a client (while it is attempting to retrieve an Olm encrypted room key backup from the homeserver) because olm_pk_decrypt has a stack-based buffer overflow. Remote code execution might be possible for some nonstandard build configurations.",
"evidence": "osv:CVE-2021-34813",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2021-34813",
"aliases": [
"CVE-2021-34813"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://gitlab.matrix.org/matrix-org/olm",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "d856c441b69fa2d3bb081c35a077725ece3ec0e5"
},
{
"fixed": "ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:matrix:olm:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "3.2.3"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"versions": [
"3.2.2",
"3.2.1",
"3.2.0",
"3.1.5",
"3.1.4",
"3.1.3",
"3.1.2",
"3.1.1",
"3.1.0",
"3.0.0",
"2.3.0",
"2.2.2",
"2.2.1",
"2.2.0",
"2.1.0",
"1.3.0",
"1.1.0",
"1.0.0",
"0.1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-34813.json",
"vanir_signatures": [
{
"id": "CVE-2021-34813-240bb04f",
"digest": {
"threshold": 0.9,
"line_hashes": [
"67187540684594846929930087958775330407",
"252238880134199690140829526927907039125",
"112731075044979816756838691158599276159",
"266670586885842653055159594457029441809",
"122863437526258609946485188487153639683",
"2322259021207589375720402312402339042",
"170628078302948138487804364359809229940",
"280008696207157238904539322325357556224",
"306982545767147644230375218821142457083",
"160271540659833010369177823877678495362",
"308281618806135522932869827565222393041",
"149136064223153088998885318011358564622",
"31400777264479745020044360703052328467",
"249163031161303586159027329025144146965",
"64992816398013141508940414006691902376",
"278982838318123888358918597633323949366",
"95614447084228899863388343554603907601",
"50985141910277076522136908930418998284",
"52922677131880317037314411531219288696",
"304011125082188447210728078135368394569",
"108512209535030714841988259827627401272",
"13058810865725070382559229120526879264",
"99818199449007817973156829142645460775"
]
},
"source": "https://gitlab.matrix.org/matrix-org/olm@ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b",
"target": {
"file": "src/pk.cpp"
},
"deprecated": false,
"signature_type": "Line",
"signature_version": "v1"
},
{
"id": "CVE-2021-34813-9e3b972a",
"digest": {
"length": 1070,
"function_hash": "147075573380992072531349232456661044906"
},
"source": "https://gitlab.matrix.org/matrix-org/olm@ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b",
"target": {
"file": "src/pk.cpp",
"function": "olm_pk_decrypt"
},
"deprecated": false,
"signature_type": "Function",
"signature_version": "v1"
}
],
"vanir_signatures_modified": "2026-10-20T14:04:47Z"
}
}
],
"modified": "2026-10-20T14:04:47.489600529Z",
"provider": "osv",
"references": [
"https://gitlab.matrix.org/matrix-org/olm/-/releases/3.2.3",
"https://gitlab.matrix.org/matrix-org/olm/-/commit/ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b",
"https://matrix.org/blog/2021/06/14/adventures-in-fuzzing-libolm"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-34813",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 388533,
"published_at": "2021-06-16T18:15:09.73+00:00"
}