Skip to main content
Vulnerability Database/CVE-2026-113707

CVE-2026-113707: a2a-rs InMemoryTaskStore Race Condition

CVE-2026-113707 is a race condition flaw in a2aproject a2a-rs affecting the InMemoryTaskStore::update function that can be exploited remotely. This post explains its technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-113707 Overview

CVE-2026-113707 is a race condition vulnerability [CWE-362] in the a2aproject/a2a-rs project through version 0.4.4. The flaw resides in the InMemoryTaskStore::update function located in a2a-server/src/task_store/inmemory.rs. Concurrent cancel requests can pass a check-then-act window, allowing a terminal task state to be overwritten. An attacker with low privileges can trigger the condition remotely over the network. The maintainers addressed the issue in commit 7050c7d329238539424ee46440e23b91c4825bee.

Critical Impact

Remote attackers with low privileges can exploit the race window in the in-memory task store to corrupt task state integrity and availability in a2a-rs servers.

Affected Products

  • a2aproject a2a-rs versions up to and including 0.4.4
  • Component: a2a-server/src/task_store/inmemory.rs
  • Function: InMemoryTaskStore::update

Discovery Timeline

  • 2026-10-21 - CVE-2026-113707 published to NVD
  • 2026-10-21 - Last updated in NVD database

Technical Details for CVE-2026-113707

Vulnerability Analysis

The vulnerability is a race condition in the in-memory task store used by the a2a-rs server. The original update path on InMemoryTaskStore did not guard terminal state transitions, and the cancel flow performed a non-atomic check-then-act sequence. Two concurrent cancel requests for the same task could both pass the initial cancelability check before either committed the state change. The result is a corrupted task lifecycle where terminal states can be overwritten with conflicting states.

Root Cause

The root cause is classified under [CWE-362] (Concurrent Execution using Shared Resource with Improper Synchronization). The pre-patch update method held the write lock only during the mutation and did not reject writes that attempted to transition a terminal task into a different state. The cancel request handler split the cancelability check and the state transition into separate critical sections, creating a time-of-check to time-of-use window.

Attack Vector

Exploitation requires network access and authenticated API access with low privileges, but no user interaction. An attacker issues multiple concurrent cancel or update requests targeting the same task identifier. The overlapping requests race through the check-then-act window and produce inconsistent task state. The confidentiality impact is none, with limited integrity and availability impact on the task store.

rust
// Patch extract: a2a-server/src/task_store/inmemory.rs
        let entry = store
            .get_mut(&task.id)
            .ok_or_else(|| A2AError::task_not_found(&task.id))?;
        // BUG-43: a terminal task's state is immutable. Re-applying the same
        // terminal state is allowed so idempotent re-emission (e.g. cancel
        // flows) keeps working, but a terminal state can never be overwritten
        // by a different state.
        if entry.task.status.state.is_terminal() && entry.task.status.state != task.status.state {
            return Err(A2AError::invalid_request(format!(
                "task {} is in terminal state {:?} and cannot transition to {:?}",
                task.id, entry.task.status.state, task.status.state
            )));
        }
        entry.version += 1;
        entry.task = task;
        Ok(entry.version)
    }

    async fn begin_cancel(&self, task_id: &str) -> Result<Task, A2AError> {
        // Hold the write lock across the check and the state transition so two
        // concurrent cancel requests cannot both pass the check-then-act window
        // (BUG-44).
        let mut store = self.tasks.write().await;
        let entry = store
            .get_mut(task_id)
            .ok_or_else(|| A2AError::task_not_found(task_id))?;
        if entry.task.status.state.is_terminal() {
            return Err(A2AError::task_not_cancelable(task_id));
        }
        entry.version += 1;

Source: GitHub Commit 7050c7d

Detection Methods for CVE-2026-113707

Indicators of Compromise

  • Multiple near-simultaneous cancel or update requests targeting the same task identifier in a2a-server access logs.
  • Task entries whose status transitions out of a terminal state such as Canceled, Completed, or Failed.
  • Unexpected version number jumps on tasks that should already be immutable.

Detection Strategies

  • Instrument the task store with structured logging around terminal-state transitions and alert on any post-terminal mutation.
  • Deploy runtime assertions in staging that compare pre- and post-update task states for terminal violations.
  • Replay production traffic against unpatched builds to confirm whether concurrent cancel traces trigger the race window.

Monitoring Recommendations

  • Monitor a2a-server request rates per task identifier and flag bursts of duplicate cancel calls.
  • Track A2AError::task_not_cancelable and invalid_request error counts after patching to validate expected behavior.
  • Correlate authentication telemetry with task mutation events to attribute concurrent requests to specific principals.

How to Mitigate CVE-2026-113707

Immediate Actions Required

  • Upgrade a2a-rs to a build that includes commit 7050c7d329238539424ee46440e23b91c4825bee or later.
  • Audit existing task records for inconsistent lifecycle transitions and reconcile corrupted entries.
  • Restrict and authenticate access to the a2a-server task management endpoints to limit exposure.

Patch Information

The fix is published in commit 7050c7d329238539424ee46440e23b91c4825bee and merged via GitHub Pull Request #126. The patch introduces an atomic begin_cancel operation on InMemoryTaskStore and rejects any update call that attempts to transition a task out of a terminal state. Rebuild and redeploy the a2a-server component after upgrading the dependency.

Workarounds

  • Serialize cancel and update requests at an upstream proxy or API gateway on a per-task-identifier basis.
  • Rate-limit cancel operations to reduce the probability of concurrent requests hitting the race window.
  • Front the service with an idempotency key enforcement layer that collapses duplicate concurrent cancel requests.
bash
# Upgrade a2a-rs to a patched revision
cd a2a-rs
git fetch origin
git checkout 7050c7d329238539424ee46440e23b91c4825bee
cargo build --release -p a2a-server

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.