GHSA-xvg8-m4x3-w6xr

Suggest an improvement
Source
https://github.com/advisories/GHSA-xvg8-m4x3-w6xr
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/11/GHSA-xvg8-m4x3-w6xr/GHSA-xvg8-m4x3-w6xr.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-xvg8-m4x3-w6xr
Aliases
  • CVE-2024-50336
Published
2024-11-12T19:54:38Z
Modified
2024-11-12T20:12:16.194200Z
Severity
  • 5.3 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N CVSS Calculator
Summary
matrix-js-sdk has insufficient MXC URI validation which allows client-side path traversal
Details

Summary

matrix-js-sdk before 34.11.0 is vulnerable to client-side path traversal via crafted MXC URIs. A malicious room member can trigger clients based on the matrix-js-sdk to issue arbitrary authenticated GET requests to the client's homeserver.

Details

The Matrix specification demands homeservers to perform validation of the server-name and media-id components of MXC URIs with the intent to prevent path traversal. However, it is not mentioned that a similar check must also be performed on the client to prevent client-side path traversal. matrix-js-sdk fails to perform this validation.

Patches

Fixed in matrix-js-sdk 34.11.1.

Workarounds

None.

References

  • https://spec.matrix.org/v1.12/client-server-api/#security-considerations-5
  • https://blog.doyensec.com/2024/07/02/cspt2csrf.html
Database specific
{
    "nvd_published_at": "2024-11-12T17:15:09Z",
    "cwe_ids": [
        "CWE-22"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2024-11-12T19:54:38Z"
}
References

Affected packages

npm / matrix-js-sdk

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
34.11.1