From c00a348837aab2b96c27080e2c9d682b66c88d90 Mon Sep 17 00:00:00 2001 From: Matt Aitchison Date: Sat, 28 Feb 2026 16:16:45 -0600 Subject: [PATCH] =?UTF-8?q?fix:=20upgrade=20pypdf=204.x=20=E2=86=92=206.7.?= =?UTF-8?q?4=20to=20resolve=2011=20Dependabot=20alerts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pypdf <6.7.4 has multiple DoS vulnerabilities via crafted PDF streams (FlateDecode, LZWDecode, RunLengthDecode, XFA, TreeObject, outlines). Only basic PdfReader/PdfWriter APIs are used in crewai-files, none of which changed in the 5.0 or 6.0 breaking releases. --- lib/crewai-files/pyproject.toml | 2 +- uv.lock | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/crewai-files/pyproject.toml b/lib/crewai-files/pyproject.toml index 148c7f64c..0a6523e8b 100644 --- a/lib/crewai-files/pyproject.toml +++ b/lib/crewai-files/pyproject.toml @@ -9,7 +9,7 @@ authors = [ requires-python = ">=3.10, <3.14" dependencies = [ "Pillow~=12.1.1", - "pypdf~=4.0.0", + "pypdf~=6.7.4", "python-magic>=0.4.27", "aiocache~=0.12.3", "aiofiles~=24.1.0", diff --git a/uv.lock b/uv.lock index 15214c9c4..55db75b2c 100644 --- a/uv.lock +++ b/uv.lock @@ -1276,7 +1276,7 @@ requires-dist = [ { name = "aiofiles", specifier = "~=24.1.0" }, { name = "av", specifier = "~=13.0.0" }, { name = "pillow", specifier = "~=12.1.1" }, - { name = "pypdf", specifier = "~=4.0.0" }, + { name = "pypdf", specifier = "~=6.7.4" }, { name = "python-magic", specifier = ">=0.4.27" }, { name = "tinytag", specifier = "~=1.10.0" }, ] @@ -6169,11 +6169,14 @@ wheels = [ [[package]] name = "pypdf" -version = "4.0.2" +version = "6.7.4" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/5f/de/5ee74158c3090ec99eae9f90c9e9c18f207fa5c722b0e95d6fa7faebcdf8/pypdf-4.0.2.tar.gz", hash = "sha256:3316d9ddfcff5df67ae3cdfe8b945c432aa43e7f970bae7c2a4ab4fe129cd937", size = 280173, upload-time = "2024-02-18T15:45:10.729Z" } +dependencies = [ + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/09/dc/f52deef12797ad58b88e4663f097a343f53b9361338aef6573f135ac302f/pypdf-6.7.4.tar.gz", hash = "sha256:9edd1cd47938bb35ec87795f61225fd58a07cfaf0c5699018ae1a47d6f8ab0e3", size = 5304821, upload-time = "2026-02-27T10:44:39.395Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d7/87/30f8a2963247fd7b1267e600379c5e3f51c9849a07d042398e4485b7415c/pypdf-4.0.2-py3-none-any.whl", hash = "sha256:a62daa2a24d5a608ba1b6284dde185317ce3644f89b9ebe5314d0c5d1c9f257d", size = 283953, upload-time = "2024-02-18T15:45:07.857Z" }, + { url = "https://files.pythonhosted.org/packages/c1/be/cded021305f5c81b47265b8c5292b99388615a4391c21ff00fd538d34a56/pypdf-6.7.4-py3-none-any.whl", hash = "sha256:527d6da23274a6c70a9cb59d1986d93946ba8e36a6bc17f3f7cce86331492dda", size = 331496, upload-time = "2026-02-27T10:44:37.527Z" }, ] [[package]]