Skip to content

Commit f557b06

Browse files
JkaviaJanardan S Kavia
andauthored
fix: upgrade vulnerable dependencies with override enforcement (#12526)
security: upgrade vulnerable dependencies with override enforcement - Add security overrides for orjson, gunicorn, pypdf, nltk, markdown, dynaconf, pillow - Update base pyproject.toml: pillow>=12.0.0, pypdf>=6.9.0 - Selective upgrade: only orjson (3.11.7->3.11.8) and pillow (11.3.0->12.2.0) - Resolves 7/8 flagged CVEs (diskcache awaiting upstream fix) - Defense-in-depth: TOML minimums + override enforcement Co-authored-by: Janardan S Kavia <janardanskavia@Janardans-MacBook-Pro.local>
1 parent 4ee94e6 commit f557b06

3 files changed

Lines changed: 192 additions & 184 deletions

File tree

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ override-dependencies = [
136136
"python-pptx>=1.0.2",
137137
# z3-solver 4.15.7 dropped Linux wheels, pin until codeflash is removed
138138
"z3-solver<4.15.7",
139+
# Security: Force upgraded versions to prevent transitive deps from pulling older vulnerable versions
140+
"orjson>=3.11.6",
141+
"gunicorn>=25.3.0",
142+
"pypdf>=6.9.0", # Force pypdf 6.9+ to prevent vulnerable 6.6.x versions
143+
"nltk>=3.9.4",
144+
"Markdown>=3.8.0",
145+
"dynaconf>=3.2.13",
146+
"pillow>=12.0.0", # Force Pillow 12+ to prevent CVE-vulnerable 11.x versions
139147
]
140148

141149
[project.scripts]

src/backend/base/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ dependencies = [
4343
"alembic>=1.13.0,<2.0.0",
4444
"passlib>=1.7.4,<2.0.0",
4545
"bcrypt==4.0.1",
46-
"pillow>=11.3.0,<13.0.0",
46+
"pillow>=12.0.0,<13.0.0",
4747
"docstring-parser>=0.16,<1.0.0",
4848
"PyJWT>=2.12.1",
4949
"pandas==2.2.3",
@@ -78,7 +78,7 @@ dependencies = [
7878
"assemblyai>=0.33.0,<1.0.0",
7979
"fastapi-pagination>=0.13.1,<1.0.0",
8080
"defusedxml>=0.7.1,<1.0.0",
81-
"pypdf>=6.6.2,<7.0.0",
81+
"pypdf>=6.9.0,<7.0.0",
8282
"validators>=0.34.0,<1.0.0",
8383
"networkx>=3.4.2,<4.0.0",
8484
"json-repair>=0.30.3,<1.0.0",

0 commit comments

Comments
 (0)