Skip to content

OpenMLS improper persistence of the secret tree during message processing

Moderate severity GitHub Reviewed Published Sep 26, 2025 in openmls/openmls • Updated Sep 28, 2025

Package

cargo openmls (Rust)

Affected versions

<= 0.7.0

Patched versions

0.7.1

Description

Summary

A bug in the OpenMLS library prevented private key material from being updated in storage during message processing. The key material in question are the keys stored in the MLS secret tree, which are used for decryption of private MLS messages. The effects of the bug are limited in scope, but can affect forward secrecy and limit how many messages can be decrypted.

Technical details

Scope

The scope of the bug is limited to private messages (application and handshake messages) received in groups. Furthermore, the scope is limited to one epoch and the effects are reset with each epoch transition, or through consecutive group operations without reloading group state in between.

Functional impact

Within each epoch of a group, there is a maximum number of private messages per sender that can be skipped before an error is thrown. The number of messages is set through maximum_forward_distance in the SenderRatchetConfiguration and the default value is 1000. The bug causes the library to think that private messages have been processed, even when that's not the case. This can cause an error to be returned during message processing.

Security impact

This bug can be exploited only if an adversary gains access to the client’s state. The risk for exploitation is thus relatively low in typical use cases.

The bug can be exploited to decrypt more messages than intended by the client. The number of additional messages that can be decrypted is limited to the number of messages that can be skipped, which is maximum_forward_distance. This means that if an adversary gains access to a client’s state, they can decrypt up to maximum_forward_distance additional messages per sender in the current epoch. This affects forward secrecy, as messages that were previously considered secure can be decrypted.

OpenMLS otherwise deletes message encryption keys as soon as an epoch ends if not otherwise configured via the max_past_epochs setting. This is still the case even in vulnerable versions.

Affected versions

Vulnerable: all versions up to and including version 0.7.0

Not vulnerable: all versions greater than and including version 0.7.1 (see below for security after upgrading from a vulnerable version to a secure one)

Mitigation

Message encryption secrets are deleted when a commit is merged, i.e. when the group transitions to the next epoch. If the client is not configured to retain message secrets for past epochs, messages decrypted in past epochs are thus secure. If past message secrets are retained, messages decrypted in past epochs are secure as soon as the relevant epoch leaves the retention window. Increasing update/commit frequency can thus help keep the window for compromise low.
Another way to mitigate the effect is to create a private message (application or handshake message) for each sender of previously received messages. It is important to do that with the same MlsGroup object, withpout reloading it from storage in between. This will ensure that the message encryption keys are updated correctly.

Security post-patch

Since the bug affects persisted state, patching by itself strictly speaking doesn’t solve the issue. State written prior to patching is still vulnerable. An affected client is fully healed from the effects of this bug as soon as it either enters the next epoch (by merging a commit), or, if message encryption key retention is configured, by advancing sufficiently many epochs for pre-patch epoch state to drop out of the retention window.

Additionally, the client is healed even before the next epoch, if it processes enough messages s.t. any messages decrypted pre-patch fall out of the window for out-of-order tolerance. This is 5 by default, but can be configured to an arbitrary number using the sender_ratchet_configuration setting during group creation.

Acknowledgements

We would like to thank Ege Erdogan and Fatih Ergin for reporting this issue.

References

@raphaelrobert raphaelrobert published to openmls/openmls Sep 26, 2025
Published to the GitHub Advisory Database Sep 26, 2025
Reviewed Sep 26, 2025
Last updated Sep 28, 2025

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v4 base metrics

Exploitability Metrics
Attack Vector Local
Attack Complexity High
Attack Requirements None
Privileges Required High
User interaction Passive
Vulnerable System Impact Metrics
Confidentiality High
Integrity None
Availability None
Subsequent System Impact Metrics
Confidentiality None
Integrity None
Availability None

CVSS v4 base metrics

Exploitability Metrics
Attack Vector: This metric reflects the context by which vulnerability exploitation is possible. This metric value (and consequently the resulting severity) will be larger the more remote (logically, and physically) an attacker can be in order to exploit the vulnerable system. The assumption is that the number of potential attackers for a vulnerability that could be exploited from across a network is larger than the number of potential attackers that could exploit a vulnerability requiring physical access to a device, and therefore warrants a greater severity.
Attack Complexity: This metric captures measurable actions that must be taken by the attacker to actively evade or circumvent existing built-in security-enhancing conditions in order to obtain a working exploit. These are conditions whose primary purpose is to increase security and/or increase exploit engineering complexity. A vulnerability exploitable without a target-specific variable has a lower complexity than a vulnerability that would require non-trivial customization. This metric is meant to capture security mechanisms utilized by the vulnerable system.
Attack Requirements: This metric captures the prerequisite deployment and execution conditions or variables of the vulnerable system that enable the attack. These differ from security-enhancing techniques/technologies (ref Attack Complexity) as the primary purpose of these conditions is not to explicitly mitigate attacks, but rather, emerge naturally as a consequence of the deployment and execution of the vulnerable system.
Privileges Required: This metric describes the level of privileges an attacker must possess prior to successfully exploiting the vulnerability. The method by which the attacker obtains privileged credentials prior to the attack (e.g., free trial accounts), is outside the scope of this metric. Generally, self-service provisioned accounts do not constitute a privilege requirement if the attacker can grant themselves privileges as part of the attack.
User interaction: This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable system. This metric determines whether the vulnerability can be exploited solely at the will of the attacker, or whether a separate user (or user-initiated process) must participate in some manner.
Vulnerable System Impact Metrics
Confidentiality: This metric measures the impact to the confidentiality of the information managed by the VULNERABLE SYSTEM due to a successfully exploited vulnerability. Confidentiality refers to limiting information access and disclosure to only authorized users, as well as preventing access by, or disclosure to, unauthorized ones.
Integrity: This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information. Integrity of the VULNERABLE SYSTEM is impacted when an attacker makes unauthorized modification of system data. Integrity is also impacted when a system user can repudiate critical actions taken in the context of the system (e.g. due to insufficient logging).
Availability: This metric measures the impact to the availability of the VULNERABLE SYSTEM resulting from a successfully exploited vulnerability. While the Confidentiality and Integrity impact metrics apply to the loss of confidentiality or integrity of data (e.g., information, files) used by the system, this metric refers to the loss of availability of the impacted system itself, such as a networked service (e.g., web, database, email). Since availability refers to the accessibility of information resources, attacks that consume network bandwidth, processor cycles, or disk space all impact the availability of a system.
Subsequent System Impact Metrics
Confidentiality: This metric measures the impact to the confidentiality of the information managed by the SUBSEQUENT SYSTEM due to a successfully exploited vulnerability. Confidentiality refers to limiting information access and disclosure to only authorized users, as well as preventing access by, or disclosure to, unauthorized ones.
Integrity: This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information. Integrity of the SUBSEQUENT SYSTEM is impacted when an attacker makes unauthorized modification of system data. Integrity is also impacted when a system user can repudiate critical actions taken in the context of the system (e.g. due to insufficient logging).
Availability: This metric measures the impact to the availability of the SUBSEQUENT SYSTEM resulting from a successfully exploited vulnerability. While the Confidentiality and Integrity impact metrics apply to the loss of confidentiality or integrity of data (e.g., information, files) used by the system, this metric refers to the loss of availability of the impacted system itself, such as a networked service (e.g., web, database, email). Since availability refers to the accessibility of information resources, attacks that consume network bandwidth, processor cycles, or disk space all impact the availability of a system.
CVSS:4.0/AV:L/AC:H/AT:N/PR:H/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

EPSS score

Weaknesses

Exposure of Sensitive Information to an Unauthorized Actor

The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. Learn more on MITRE.

CVE ID

No known CVE

GHSA ID

GHSA-qr9h-x63w-vqfm

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.