Summary
Cocos AI Intra-handshake attested TLS implementation is vulnerable to TOCTOU Attacks
An attacker who can modify the attested workload’s code, memory-backed state, or configuration after the initial attestation, but without necessarily terminating the existing TLS connection, can cause the peer to continue trusting the connection as if the originally attested state were still running.
Details
Once attestation is successfully appraised and connection is established, there is a window of vulnerability from the establishment of connection to the termination of connection where an attacker can modify the state of the workload and platform at runtime on the TLS endpoint acting as the Attester. Workload state includes code, data, and configuration. Other examples of state changes at the workload level include cases where a new device (such as a GPU) is connected, or where a connected device is disconnected, since the connection establishment.
In Cocos AI, there is no mechanism for the peer to know that some state has changed in the Attester after the connection establishment. The vulnerability is particularly concerning for long-lived connections.
In short, this vulnerability was possible because Cocos AI performs attestation only once in the lifetime of the connection (at connection establishment time) and the verifying peer continues to believe that the state is the same as in initial Evidence throughout, whereas it could be stale at some point in time.
This vulnerability for Cocos AI was found and demonstrated by Muhammad Usama Sardar via formal analysis. Formal analysis was performed in the state-of-the-art tool, ProVerif.
Workarounds
The proposed workaround is to allow re-attestation of the workload after periodic or user-defined intervals using post-handshake attestation.
Background and General Technical Details
For background and general (not specific to Cocos AI) technical details on this vulnerability, please see G-RA2: Freshness of Evidence in Sec. 5.1.1 of Identity Crisis in Confidential Computing: Formal Analysis of Attested TLS. Also, see the corresponding formal analysis.
Credits
This vulnerability for Cocos AI was found and responsibly disclosed by Muhammad Usama Sardar (TU Dresden, Germany).
Impact
CVE-2026-119345 has a CVSS score of 6.3 (High). The vector is requires local access, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.9.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2026-119345? CVE-2026-119345 is a high-severity security vulnerability in github.com/ultravioletrs/cocos (go), affecting versions <= 0.8.2. It is fixed in 0.9.0.
- How severe is CVE-2026-119345? CVE-2026-119345 has a CVSS score of 6.3 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/ultravioletrs/cocos are affected by CVE-2026-119345? github.com/ultravioletrs/cocos (go) versions <= 0.8.2 is affected.
- Is there a fix for CVE-2026-119345? Yes. CVE-2026-119345 is fixed in 0.9.0. Upgrade to this version or later.
- Is CVE-2026-119345 exploitable, and should I be worried? Whether CVE-2026-119345 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-119345 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-119345? Upgrade
github.com/ultravioletrs/cocosto 0.9.0 or later.