CVE-2024-40648: matrix-sdk-crypto's `UserIdentity :is_verified` Not Checking Verification Status Vulnerability
MODERATECVE-2024-40648 is a MODERATE (CVSS 4.8) :is_verified` not checking verification status vulnerability (CWE-287: Improper Authentication) affecting matrix-sdk-crypto's `UserIdentity libraries in the crates.io ecosystem. The issue involves :is_verified` not checking verification status of own user identity while performing the check. Remediation is available by upgrading affected packages to version 0.7.2.
CVE-2024-40648 at a Glance
Security Impact
CVSS: 4.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2024-40648
To remediate this vulnerability, upgrade all affected matrix-sdk-crypto's `UserIdentity dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade matrix-sdk-crypto to 0.7.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for matrix-sdk-crypto
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-40648, inspect your project dependencies for matrix-sdk-crypto's `UserIdentity:
inspect dependencies for matrix-sdk-crypto
Analyze the terminal output to locate any version of matrix-sdk-crypto's `UserIdentity in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In matrix-sdk-crypto's `UserIdentity, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-40648 Affected matrix-sdk-crypto's `UserIdentity Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
matrix-sdk-crypto
|
crates.io |
< 0.7.2
|
0.7.2
|
References
Frequently Asked Questions
What is CVE-2024-40648?
Which matrix-sdk-crypto's `UserIdentity versions are affected?
What version fixes CVE-2024-40648?
Is matrix-sdk-crypto affected?
What is the CVSS score of CVE-2024-40648?
What CWE is associated with CVE-2024-40648?
How can I check crates.io dependencies for CVE-2024-40648?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4qg4-cvh2-crgg",
"modified" : "2024-07-19T15:27:44Z",
"published" : "2024-07-18T15:28:07Z",
"aliases" : [ "CVE-2024-40648" ],
"summary" : "matrix-sdk-crypto's `UserIdentity::is_verified` not checking verification status of own user identity while performing the check",
"details" : "The `UserIdentity::is_verified()` method in the matrix-sdk-crypto crate before version 0.7.2 doesn't take into account the verification status of the user's own identity while performing the check and may as a result return a value contrary to what is implied by its name and documentation.\n\n### Impact\n\nIf the method is used to decide whether to perform sensitive operations towards a user identity, a malicious homeserver could manipulate the outcome in order to make the identity appear trusted. This is not a typical usage of the method, which lowers the impact. The method itself is not used inside the `matrix-sdk-crypto` crate.\n\n### Patches\n\nThe 0.7.2 release of the `matrix-sdk-crypto` crate includes a fix.\n\n### Workarounds\n\nNone.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "matrix-sdk-crypto"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/matrix-org/matrix-rust-sdk/security/advisories/GHSA-4qg4-cvh2-crgg"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-40648"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/matrix-rust-sdk/commit/76a7052149bb8f722df12da915b3a06d19a6695a"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/matrix-org/matrix-rust-sdk"
}, {
"type" : "WEB",
"url" : "https://github.com/matrix-org/matrix-rust-sdk/releases/tag/0.7.2-crypto"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2024-0356.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-287", "CWE-863" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-07-18T15:28:07Z",
"nvd_published_at" : "2024-07-18T17:15:05Z"
}
}