CVE-2025-31127 Overview
CVE-2025-31127 is an information disclosure vulnerability affecting Element X Android, a Matrix client provided by element.io. The flaw exists in versions between 0.4.16 and 25.03.3. Under specific conditions, the entity controlling the element.json well-known file can access media encryption keys used for an Element Call session. This exposure undermines the confidentiality guarantees of encrypted call media within the Matrix ecosystem. The issue is categorized under [CWE-200] Exposure of Sensitive Information to an Unauthorized Actor. Element released a fix in version 25.03.4.
Critical Impact
An attacker in control of the element.json well-known file can obtain media encryption keys for Element Call sessions, breaking call media confidentiality.
Affected Products
- Element X Android versions 0.4.16 through 25.03.3
- Element Call functionality within affected Element X Android builds
- Matrix deployments that rely on Element X Android as the client
Discovery Timeline
- 2025-04-03 - CVE-2025-31127 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-31127
Vulnerability Analysis
Element X Android is the Matrix client maintained by element.io for Android devices. The client uses the Matrix well-known discovery mechanism, retrieving configuration from an element.json file hosted at a server-controlled location. This file supplies configuration parameters that influence how the client establishes Element Call sessions.
The vulnerability allows the entity that controls the element.json well-known file to obtain the media encryption keys used for an Element Call. Because Element Call is designed to provide end-to-end encrypted media, key exposure to a well-known file operator breaks that trust boundary. The impact is limited to confidentiality, with no direct effect on integrity or availability.
Root Cause
The root cause is improper trust placed in configuration values sourced from the element.json well-known file. Under certain conditions, the client permits that configuration to influence media key handling for Element Call, resulting in disclosure of encryption keys to the entity serving the well-known file. See the GitHub Security Advisory GHSA-x2g5-f28j-p7w6 for further technical detail.
Attack Vector
An attacker who controls the element.json well-known file for a targeted homeserver can leverage this position to receive media encryption keys during Element Call sessions initiated by affected clients. The attack is network-based, requires no authentication, and requires no user interaction. Details are described in the element-meta issue tracker.
No verified public exploit code is available for this issue, and no synthetic proof-of-concept is included here.
Detection Methods for CVE-2025-31127
Indicators of Compromise
- Unexpected changes to the element.json well-known file hosted for a Matrix homeserver domain.
- Well-known responses served from unauthorized hosts or infrastructure not associated with the legitimate homeserver operator.
- Element X Android clients on affected versions initiating Element Call sessions after well-known configuration changes.
Detection Strategies
- Inventory Android endpoints running Element X Android and flag versions between 0.4.16 and 25.03.3.
- Monitor HTTP responses for /.well-known/element.json and alert on content or origin changes.
- Correlate mobile client version telemetry with Element Call session initiation logs to identify at-risk sessions.
Monitoring Recommendations
- Establish integrity monitoring on the web server hosting the element.json well-known file.
- Log and review DNS and TLS certificate changes for the domain serving well-known Matrix discovery data.
- Track Element X Android client version distribution over time and alert when vulnerable versions reappear.
How to Mitigate CVE-2025-31127
Immediate Actions Required
- Upgrade Element X Android to version 25.03.4 or later on all managed Android devices.
- Audit control and access permissions for the web server hosting element.json for your Matrix domain.
- Rotate any credentials or keys associated with sessions that may have occurred with a compromised well-known file.
Patch Information
The vulnerability is fixed in Element X Android version 25.03.4. Users on any version between 0.4.16 and 25.03.3 must update. Refer to the GitHub Security Advisory GHSA-x2g5-f28j-p7w6 for release notes and remediation guidance.
Workarounds
- Restrict write access to the element.json well-known file to trusted administrators only.
- Serve the well-known file exclusively from infrastructure controlled by the homeserver operator with strict change control.
- Discourage use of Element Call from affected Element X Android versions until clients are updated to 25.03.4.
# Verify Element X Android package version on a managed device
adb shell dumpsys package io.element.android.x | grep versionName
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

