Skip to content

upgrade django to fix pip_audit#1790

Merged
acosferreira merged 1 commit intomainfrom
ana/aap-54545-update-django
Nov 13, 2025
Merged

upgrade django to fix pip_audit#1790
acosferreira merged 1 commit intomainfrom
ana/aap-54545-update-django

Conversation

@acosferreira
Copy link
Contributor

@acosferreira acosferreira commented Nov 12, 2025

Jira Issue: https://issues.redhat.com/browse/AAP-54545

Description

update django to fix

django | 4.2.25 | GHSA-qw25-v68c-qjf3 | 4.2.26,5.1.14,5.2.8 | An issue was discovered in 5.1 before 5.1.14, 4.2 before 4.2.26, and 5.2 before 5.2.8. NFKC normalization in Python is slow on Windows. As a consequence, `django.http.HttpResponseRedirect`, `django.http.HttpResponsePermanentRedirect`, and the shortcut `django.shortcuts.redirect`  were subject to a potential  denial-of-service attack via certain inputs with a very large number of Unicode characters. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected. Django would like to thank Seokchan Yoon for reporting this issue.
django | 4.2.25 | GHSA-frmv-pr5f-9mcr | 4.2.26,5.1.14,5.2.8 | An issue was discovered in 5.1 before 5.1.14, 4.2 before 4.2.26, and 5.2 before 5.2.8. The methods `QuerySet.filter()`, `QuerySet.exclude()`, and `QuerySet.get()`, and the class `Q()`, are subject to SQL injection when using a suitably crafted dictionary, with dictionary expansion, as the `_connector` argument. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected. Django would like to thank cyberstan for reporting this issue.

Testing

Steps to test

  1. Pull down the PR
  2. ...
  3. ...

Scenarios tested

Production deployment

  • This code change is ready for production on its own
  • This code change requires the following considerations before going to production:

Note

Upgrade Django to 4.2.26, pin pip<24.1 in the pip-compile workflow, and regenerate compiled requirements (including a full requirements.txt).

  • Dependencies:
    • Upgrade Django from 4.2.25 to 4.2.26 in pyproject.toml, requirements.in, and compiled requirements-*.txt.
  • CI:
    • Update .github/workflows/pip_compile.yml to pip install --upgrade "pip<24.1" before installing pip-tools.
  • Requirements:
    • Regenerate requirements-aarch64.txt, requirements-x86_64.txt, and produce a fully expanded requirements.txt from requirements.in.

Written by Cursor Bugbot for commit 6ecb0fd. This will update automatically on new commits. Configure here.

@acosferreira acosferreira requested a review from de1987 November 12, 2025 22:41
@acosferreira acosferreira force-pushed the ana/aap-54545-update-django branch from d1d3958 to e32835d Compare November 12, 2025 22:43
@acosferreira acosferreira force-pushed the ana/aap-54545-update-django branch from 70e55d0 to cd969a2 Compare November 12, 2025 22:55
@acosferreira acosferreira force-pushed the ana/aap-54545-update-django branch from cd969a2 to 6ecb0fd Compare November 12, 2025 22:59
echo "ARCH=$(uname -m)" >> "$GITHUB_ENV"
- name: install
run: |
pip install --upgrade "pip<24.1"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Lockfile Drift Breaks Dependency Management

The workflow monitors requirements.txt for changes but only validates architecture-specific files. After changing requirements.txt from a simple reference file to a full lockfile, the workflow now fails to regenerate or validate it when dependencies change. This causes requirements.txt to drift from requirements-{arch}.txt files over time, potentially breaking installations.

Fix in Cursor Fix in Web

@sonarqubecloud
Copy link

@acosferreira acosferreira enabled auto-merge (squash) November 12, 2025 23:15
@de1987 de1987 changed the title upgrade django to fix pip_compile upgrade django to fix pip_audit Nov 13, 2025
@acosferreira acosferreira merged commit 629f6a7 into main Nov 13, 2025
12 checks passed
@acosferreira acosferreira deleted the ana/aap-54545-update-django branch November 13, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants