---
updatedAt: 2026-07-29T07:49:04.000Z
agentTools:
  projectIndex: https://docs.brightsec.com/llms.txt
---

# MCP Attacks

<Table align={["left","left","left","left"]}>
  <thead>
    <tr>
      <th style={{ textAlign: "left" }}>
        Test Name
      </th>

      <th style={{ textAlign: "left" }}>
        API ID
      </th>

      <th style={{ textAlign: "left" }}>
        Description
      </th>

      <th style={{ textAlign: "left" }}>
        Detectable Vulnerabilities
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td style={{ textAlign: "left" }}>
        AESI: ANSI Escape Sequence Injection
      </td>

      <td style={{ textAlign: "left" }}>
        `aesi`
      </td>

      <td style={{ textAlign: "left" }}>
        Checks whether MCP tools, resources, or prompt templates can fetch external content and return ANSI-concealed instructions that are hidden from terminal users but still visible to downstream models
      </td>

      <td style={{ textAlign: "left" }}>
        [AESI: ANSI Escape Sequence Injection](https://docs.brightsec.com/docs/ansi-escape-sequence-injection-aesi)
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        Stored AESI: ANSI Escape Sequence Injection
      </td>

      <td style={{ textAlign: "left" }}>
        `stored_aesi`
      </td>

      <td style={{ textAlign: "left" }}>
        Checks whether MCP integrations can persist externally hosted ANSI-concealed instructions and expose them later to downstream models
      </td>

      <td style={{ textAlign: "left" }}>
        [Stored AESI: ANSI Escape Sequence Injection](https://docs.brightsec.com/docs/stored-ansi-escape-sequence-injection-aesi)
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        MCP Predictable Session ID
      </td>

      <td style={{ textAlign: "left" }}>
        `mcp_predictable_session_id`
      </td>

      <td style={{ textAlign: "left" }}>
        Checks whether an MCP server generates Mcp-Session-Id values with enough randomness to prevent an attacker from guessing a valid session and hijacking another client's MCP session
      </td>

      <td style={{ textAlign: "left" }}>
        [MCP Predictable Session ID](https://docs.brightsec.com/docs/mcp-predictable-session-id)
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        MCP Session ID as Authentication
      </td>

      <td style={{ textAlign: "left" }}>
        `mcp_session_as_auth`
      </td>

      <td style={{ textAlign: "left" }}>
        Checks whether the MCP server re-verifies application-level authentication on every request or relies on the session ID alone, allowing session-replay attacks
      </td>

      <td style={{ textAlign: "left" }}>
        [MCP Session ID as Authentication](https://docs.brightsec.com/docs/mcp-session-id-as-authentication)
      </td>
    </tr>

    <tr>
      <td style={{ textAlign: "left" }}>
        MCP Lack of Session Invalidation
      </td>

      <td style={{ textAlign: "left" }}>
        `mcp_session_not_invalidated`
      </td>

      <td style={{ textAlign: "left" }}>
        Checks whether the MCP server actually removes sessions when it confirms termination via HTTP DELETE, preventing post-logout session reuse
      </td>

      <td style={{ textAlign: "left" }}>
        [MCP Lack of Session Invalidation](https://docs.brightsec.com/docs/mcp-lack-of-session-invalidation)
      </td>
    </tr>
  </tbody>
</Table>