fix(VULN-103416): bump mcp to >=1.27.2 for task isolation CVE - #186
Conversation
fercor-cisco
left a comment
There was a problem hiding this comment.
🤖 This review was generated by the Astra agent (claude-opus-4-8). It may contain mistakes.
Verdict: needs_discussion — The version floor correctly remediates the CVE, but it is added as a mandatory core dependency, which contradicts the PR's stated scope and expands the base install footprint — worth confirming intent.
fercor-cisco
left a comment
There was a problem hiding this comment.
this should not be a mandatory dependency of the SDK
Add a direct mcp floor in pyproject.toml and refresh poetry.lock so transitive MCP SDK usage resolves to 1.29.0 (fixed release). Pin the log-mcp-calls example requirements to the same minimum. Co-authored-by: Cursor <cursoragent@cursor.com>
1304f38 to
e81c7c7
Compare
fercor-cisco
left a comment
There was a problem hiding this comment.
🤖 This review was generated by the Astra agent (claude-opus-4-8). It may contain mistakes.
Verdict: needs_discussion — Lock is floored to a safe mcp (FOSSA goal met), but mcp is an orphaned optional dependency (in no extra), so the floor won't propagate to published extras and Poetry will warn — confirm intended scope.
| opentelemetry-exporter-otlp-proto-http = "^1.38.0" | ||
| filelock = ">=3.20.1" | ||
| idna = ">=3.15,<4" | ||
| mcp = { version = ">=1.27.2,<2", optional = true } |
There was a problem hiding this comment.
🟠 major (design): mcp is declared optional = true but is not referenced by any entry in [project.optional-dependencies] (openai, crewai, all, middleware, langchain — none list mcp). This makes it an orphaned optional dependency, which has two consequences:
- The floor does not reach SDK consumers. Poetry excludes optional deps that aren't part of any extra from the built distribution's
Requires-Distmetadata. Sopip install splunk-ao[openai](or[crewai]/[all]) from a published wheel will resolvemcppurely under the transitive constraints ofopenai-agents/crewai/litellm, which permit the vulnerable 1.23.0–1.27.1 range. Only this repo's pinnedpoetry.lockis protected — which does satisfy FOSSA for the ticket, but the fix does not protect downstream installs. - Poetry warns on an optional dependency that belongs to no extra (
poetry checkflags "declared as optional but not in any extra").
This is exactly what the earlier review comment asked for: keep it optional and add mcp>=1.27.2,<2 to the openai, crewai, and all extras so the floor is exported to the package metadata. If protecting only this repo's lock is the intended scope, please confirm in the PR description; otherwise add it to the extras.
| mcp = { version = ">=1.27.2,<2", optional = true } | |
| mcp = { version = ">=1.27.2,<2", optional = true } | |
| # and add "mcp>=1.27.2,<2" to the openai, crewai, and all entries in | |
| # [project.optional-dependencies] so the floor is exported to package metadata |
🤖 Generated by the Astra agent
Resolve poetry.lock conflict by keeping mcp 1.29.0 and updating pytest to match main (>=9.0.3). Co-authored-by: Cursor <cursoragent@cursor.com>
Wire the optional mcp>=1.27.2,<2 constraint into package extras metadata so downstream pip installs enforce the patched version, not only this repo lock. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve conflicts after requests>=2.33.0 landed on main; keep both requests and mcp security floors and regenerate lock (mcp 1.29.0). Co-authored-by: Cursor <cursoragent@cursor.com>
fercor-cisco
left a comment
There was a problem hiding this comment.
🤖 This review was generated by the Astra agent (claude-opus-5). It may contain mistakes.
Verdict: approve — The CVE floor is correctly declared as an optional dep and wired into the openai/crewai/all extras so it reaches published metadata; lock resolves mcp to 1.29.0 (> fixed 1.27.2). Only a minor packaging wart remains.
Follow-ups
Suggested follow-up work that could be tracked as Jira tickets:
pyproject.toml:63-63: This PR is the second CVE-driven floor added directly to[tool.poetry.dependencies]purely to constrain a transitive dep (alongsidefilelock,idna,requestson lines 60-62). None of these carry a comment explaining why they exist, so a future cleanup could plausibly remove them as "unused direct deps" and silently reopen the vulnerability. Consider adding a short# VULN-xxxxx: floor for CVE-yyyycomment convention to each such pin, or grouping them under a clearly-labelled section.poetry.lock:6564-6567: CI (.github/workflows/ci-tests.yaml) runspoetry install --all-extras --no-rootbut neverpoetry check --lock. Since security floors like this one are only enforced end-to-end whenpyproject.tomlandpoetry.lockagree, a drifted lock (stalecontent-hash) would not fail the build. Adding apoetry check --lockstep would catch that class of regression cheaply.
| openai = ["openai (>=2.8.0,<3.0.0)", "packaging (>=24.2,<25.0)", "openai-agents (>=0.4.0,<1.0.0)"] | ||
| crewai = ["crewai (>=0.152.0,<2.0.0); python_version < '3.14'", "litellm (>=1.83.14,<2.0.0); python_version < '3.14'"] | ||
| openai = ["openai (>=2.8.0,<3.0.0)", "packaging (>=24.2,<25.0)", "openai-agents (>=0.4.0,<1.0.0)", "mcp (>=1.27.2,<2)"] | ||
| crewai = ["crewai (>=0.152.0,<2.0.0); python_version < '3.14'", "litellm (>=1.83.14,<2.0.0); python_version < '3.14'", "mcp (>=1.27.2,<2)"] |
There was a problem hiding this comment.
🟡 minor (design): The mcp entry in the crewai extra is unconditional, while its two siblings in the same list (crewai, litellm) are both gated ; python_version < '3.14'.
Consequence: on Python 3.14, pip install splunk-ao[crewai] installs neither crewai nor litellm — so nothing in the resulting environment consumes MCP — yet it now pulls in mcp plus its full subtree (cryptography, uvicorn, starlette, sse-starlette, python-multipart, pyjwt[crypto], jsonschema, referencing, rpds-py). That includes a compiled crypto package and an ASGI server stack for an extra that is otherwise empty on 3.14. poetry.lock confirms this is the resolved behavior — the mcp marker contains a bare extra == "crewai" disjunct with no python_version guard (poetry.lock:2402).
Since MCP only reaches this extra transitively via crewai/litellm, the floor should carry the same Python gate so it applies exactly where the consuming package is installed.
Note this only applies to the crewai extra — leave openai and all unconditional, since openai-agents requires mcp>=1.19.0,<2 on all supported Pythons (poetry.lock:2980) and so genuinely needs the floor raised on 3.14 too. Likewise, do not add a python marker to the [tool.poetry.dependencies] entry on line 63, for the same reason.
Requires a poetry lock regen after the change.
| crewai = ["crewai (>=0.152.0,<2.0.0); python_version < '3.14'", "litellm (>=1.83.14,<2.0.0); python_version < '3.14'", "mcp (>=1.27.2,<2)"] | |
| crewai = ["crewai (>=0.152.0,<2.0.0); python_version < '3.14'", "litellm (>=1.83.14,<2.0.0); python_version < '3.14'", "mcp (>=1.27.2,<2); python_version < '3.14'"] |
🤖 Generated by the Astra agent
There was a problem hiding this comment.
Technically true but minor, ok to ship as is.
Resolve pyproject.toml conflicts by keeping both mcp >=1.27.2 and pdfminer-six >=20251107 floors, then regenerate poetry.lock. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
server.experimental.enable_tasks()is used on MCP servers.mcp >= 1.27.2, < 2floor inpyproject.tomland refreshespoetry.lockso transitive usage (viacrewai,openai-agents,litellmextras) resolves to mcp 1.29.0.log-mcp-callsexample requirements to the same minimum.Risk assessment
enable_tasks(); MCP usage is client-side only in the logging example.mcp==1.27.0(affected range).