Skip to content

Commit 548e7eb

Browse files
authored
Merge pull request BerriAI#23678 from BerriAI/litellm_security_bump_mar14
[Fix] Bump PyJWT to ^2.12.0 for Security
2 parents b988a8d + d3587b1 commit 548e7eb

File tree

7 files changed

+15
-14
lines changed

7 files changed

+15
-14
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt
3939
# ensure pyjwt is used, not jwt
4040
RUN pip uninstall jwt -y
4141
RUN pip uninstall PyJWT -y
42-
RUN pip install PyJWT==2.9.0 --no-cache-dir
42+
RUN pip install PyJWT==2.12.0 --no-cache-dir
4343

4444
# Runtime stage
4545
FROM $LITELLM_RUNTIME_IMAGE AS runtime

docker/Dockerfile.database

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ RUN sed -i 's/\r$//' docker/install_auto_router.sh && chmod +x docker/install_au
112112
# ensure pyjwt is used, not jwt
113113
RUN pip uninstall jwt -y
114114
RUN pip uninstall PyJWT -y
115-
RUN pip install PyJWT==2.9.0 --no-cache-dir
115+
RUN pip install PyJWT==2.12.0 --no-cache-dir
116116

117117
# Build Admin UI (runtime stage)
118118
# Convert Windows line endings to Unix and make executable

docker/Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
3131
# Fix JWT dependency conflicts early
3232
RUN pip uninstall jwt -y || true && \
3333
pip uninstall PyJWT -y || true && \
34-
pip install PyJWT==2.9.0 --no-cache-dir
34+
pip install PyJWT==2.12.0 --no-cache-dir
3535

3636
# Copy only necessary files for build
3737
COPY pyproject.toml README.md schema.prisma poetry.lock ./

docker/Dockerfile.non_root

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ RUN for i in 1 2 3; do \
3232
# Cache Python dependencies
3333
COPY requirements.txt .
3434
RUN pip wheel --no-cache-dir --wheel-dir=/wheels/ -r requirements.txt \
35-
&& pip wheel --no-cache-dir --wheel-dir=/wheels/ "semantic_router==0.1.11" "aurelio-sdk==0.0.19" "PyJWT==2.9.0"
35+
&& pip wheel --no-cache-dir --wheel-dir=/wheels/ "semantic_router==0.1.11" "aurelio-sdk==0.0.19" "PyJWT==2.12.0"
3636

3737
# Copy source after dependency layers
3838
COPY . .
@@ -106,7 +106,7 @@ RUN for i in 1 2 3; do \
106106
apk add --no-cache python3 py3-pip bash openssl tzdata nodejs npm supervisor && break || sleep 5; \
107107
done \
108108
&& apk upgrade --no-cache nodejs \
109-
&& npm install -g npm@latest tar@7.5.10 glob@11.1.0 @isaacs/brace-expansion@5.0.1 minimatch@10.2.4 diff@8.0.3 \
109+
&& npm install -g npm@latest tar@7.5.11 glob@11.1.0 @isaacs/brace-expansion@5.0.1 minimatch@10.2.4 diff@8.0.3 \
110110
&& GLOBAL="$(npm root -g)" \
111111
&& find "$GLOBAL/npm" -type d -name "tar" -path "*/node_modules/tar" | while read d; do \
112112
rm -rf "$d" && cp -rL "$GLOBAL/tar" "$d"; \
@@ -198,7 +198,7 @@ RUN sed -i 's/\r$//' docker/entrypoint.sh && \
198198
chown -R nobody:nogroup /app /var/lib/litellm/ui /var/lib/litellm/assets /nonexistent /.npm && \
199199
pip uninstall jwt -y || true && \
200200
pip uninstall PyJWT -y || true && \
201-
pip install --no-index --find-links=/wheels/ PyJWT==2.10.1 --no-cache-dir && \
201+
pip install --no-index --find-links=/wheels/ PyJWT==2.12.0 --no-cache-dir && \
202202
rm -rf /wheels && \
203203
PRISMA_PATH=$(python -c "import os, prisma; print(os.path.dirname(prisma.__file__))") && \
204204
chown -R nobody:nogroup $PRISMA_PATH && \

poetry.lock

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ rq = {version = "*", optional = true}
4444
orjson = {version = "^3.9.7", optional = true}
4545
apscheduler = {version = "^3.10.4", optional = true}
4646
fastapi-sso = { version = "^0.16.0", optional = true }
47-
PyJWT = { version = "^2.10.1", optional = true, python = ">=3.9" }
47+
PyJWT = { version = "^2.12.0", optional = true, python = ">=3.9" }
4848
python-multipart = { version = ">=0.0.20", optional = true}
4949
cryptography = {version = "*", optional = true}
5050
prisma = {version = "^0.11.0", optional = true}

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ orjson==3.11.7 # fast /embedding responses
4040
polars==1.31.0 # for data processing
4141
apscheduler==3.10.4 # for resetting budget in background
4242
fastapi-sso==0.19.0 # admin UI, SSO
43-
pyjwt[crypto]==2.10.1 ; python_version >= "3.9"
43+
pyjwt[crypto]==2.12.0 ; python_version >= "3.9"
4444
python-multipart>=0.0.20 # admin UI
4545
jaraco.context>=6.1.0
4646
azure-ai-contentsafety==1.0.0 # for azure content safety

0 commit comments

Comments
 (0)