{"id":"CVE-2021-34813","details":"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.","modified":"2026-07-09T01:25:33.583413Z","published":"2021-06-16T18:15:09.730Z","references":[{"type":"ADVISORY","url":"https://gitlab.matrix.org/matrix-org/olm/-/releases/3.2.3"},{"type":"FIX","url":"https://gitlab.matrix.org/matrix-org/olm/-/commit/ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b"},{"type":"FIX","url":"https://matrix.org/blog/2021/06/14/adventures-in-fuzzing-libolm"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://gitlab.matrix.org/matrix-org/olm","events":[{"introduced":"0"},{"fixed":"d856c441b69fa2d3bb081c35a077725ece3ec0e5"},{"fixed":"ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b"}],"database_specific":{"cpe":"cpe:2.3:a:matrix:olm:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0"},{"fixed":"3.2.3"}],"source":["CPE_RANGE","REFERENCES"]}}],"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_modified":"2026-07-09T01:25:33Z","vanir_signatures":[{"deprecated":false,"digest":{"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"],"threshold":0.9},"id":"CVE-2021-34813-240bb04f","signature_type":"Line","signature_version":"v1","source":"https://gitlab.matrix.org/matrix-org/olm@ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b","target":{"file":"src/pk.cpp"}},{"digest":{"function_hash":"147075573380992072531349232456661044906","length":1070},"id":"CVE-2021-34813-9e3b972a","signature_type":"Function","signature_version":"v1","source":"https://gitlab.matrix.org/matrix-org/olm@ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b","target":{"file":"src/pk.cpp","function":"olm_pk_decrypt"},"deprecated":false}]}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}