Skip to content

Commit 2fd91b6

Browse files
joaomdmouraclaude
andcommitted
fix(deps): raise mcp floor past session-auth and websocket advisories
mcp 1.26.0 has GHSA-hvrp-rf83-w775 and GHSA-jpw9-pfvf-9f58 (fixed in 1.27.2) plus GHSA-vj7q-gjh5-988w (fixed in 1.28.1); the ~=1.26.0 pin blocked all three patches. Raise to >=1.28.1,<2 (locks 1.28.1) and extend the pin guardrail tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 536a02b commit 2fd91b6

3 files changed

Lines changed: 73 additions & 52 deletions

File tree

lib/crewai/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dependencies = [
4040
"portalocker~=2.7.0",
4141
"pydantic-settings>=2.10.1,<3",
4242
"httpx~=0.28.1",
43-
"mcp~=1.26.0",
43+
"mcp>=1.28.1,<2",
4444
"aiosqlite~=0.21.0",
4545
"pyyaml~=6.0",
4646
"aiofiles~=24.1.0",

lib/crewai/tests/security/test_dependency_pins.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,27 @@ def _get_requirement(name: str) -> Requirement:
2525
raise AssertionError(f"{name} not found in [project.dependencies]")
2626

2727

28+
class TestMcpPin:
29+
"""GHSA-hvrp-rf83-w775 / GHSA-jpw9-pfvf-9f58 (fixed in mcp 1.27.2) and
30+
GHSA-vj7q-gjh5-988w (fixed in 1.28.1): session/task-handler auth gaps and
31+
missing WebSocket Host/Origin validation in the MCP Python SDK. A
32+
compatible-release pin on 1.26.x blocks all three patches."""
33+
34+
def test_requirement_excludes_vulnerable_range(self) -> None:
35+
requirement = _get_requirement("mcp")
36+
for vulnerable in ("1.26.0", "1.27.2", "1.28.0"):
37+
assert not requirement.specifier.contains(vulnerable), (
38+
f"mcp requirement '{requirement}' admits {vulnerable}, which "
39+
"is vulnerable to GHSA-vj7q-gjh5-988w (fixed in 1.28.1)"
40+
)
41+
42+
def test_requirement_admits_patched_releases(self) -> None:
43+
requirement = _get_requirement("mcp")
44+
assert requirement.specifier.contains("1.28.1"), (
45+
f"mcp requirement '{requirement}' blocks patched version 1.28.1"
46+
)
47+
48+
2849
class TestJsonRepairPin:
2950
"""GHSA-xf7x-x43h-rpqh: json-repair < 0.60.1 has an unbounded-CPU DoS on
3051
circular JSON Schema $ref structures. crewai feeds LLM output to

uv.lock

Lines changed: 51 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)