CVE-2021-34813

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-34813
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-34813.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-34813
Downstream
Published
2021-06-16T18:15:09.730Z
Modified
2025-11-20T11:45:24.289728Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
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 olmpkdecrypt has a stack-based buffer overflow. Remote code execution might be possible for some nonstandard build configurations.

References

Affected packages

Git / gitlab.matrix.org/matrix-org/olm

Affected ranges

Type
GIT
Repo
https://gitlab.matrix.org/matrix-org/olm
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

0.*

0.1.0

1.*

1.0.0
1.1.0
1.2.0
1.3.0

2.*

2.0.0
2.1.0
2.2.0
2.2.1
2.2.2
2.3.0

3.*

3.0.0
3.1.0
3.1.1
3.1.2
3.1.3
3.1.4
3.1.5
3.2.0
3.2.1
3.2.2

AndroidSdk_v0.*

AndroidSdk_v0.1.0
AndroidSdk_v0.2.0

olmkit-v2.*

olmkit-v2.0.0

Database specific

vanir_signatures

[
    {
        "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",
        "deprecated": false,
        "target": {
            "file": "src/pk.cpp"
        },
        "id": "CVE-2021-34813-240bb04f",
        "signature_version": "v1",
        "signature_type": "Line"
    },
    {
        "digest": {
            "function_hash": "147075573380992072531349232456661044906",
            "length": 1070.0
        },
        "source": "https://gitlab.matrix.org/matrix-org/olm@ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b",
        "deprecated": false,
        "target": {
            "file": "src/pk.cpp",
            "function": "olm_pk_decrypt"
        },
        "id": "CVE-2021-34813-9e3b972a",
        "signature_version": "v1",
        "signature_type": "Function"
    }
]