Skip to content

security(deps): bump pillow floor to 12.3.0 and update vulnerable flatpak pins - #136

Merged
nelsonduarte merged 2 commits into
mainfrom
fix/supply-chain-flatpak-pillow
Jul 28, 2026
Merged

security(deps): bump pillow floor to 12.3.0 and update vulnerable flatpak pins#136
nelsonduarte merged 2 commits into
mainfrom
fix/supply-chain-flatpak-pillow

Conversation

@nelsonduarte

Copy link
Copy Markdown
Owner

Summary

Supply-chain fix from a dependency audit. The shipped artefacts (Windows/MSIX/Snap) are cleanrequirements.txt uses >= floors that resolve to patched versions at build time. This PR closes two remaining gaps that would only bite in specific conditions:

  1. requirements.txt pillow floor did not encode the security fix. The line was pillow>=12.1.1, whose lower bound still permits resolving to the vulnerable 12.1.1 (26 CVEs across image decoders). Raised to pillow>=12.3.0. Also bumped pymupdf>=1.27.2.3 -> pymupdf>=1.28.0 for hygiene (1.28.0 verified real and latest on PyPI). All other lines already encode their security floor and were left untouched.

  2. The dormant flatpak/ pinned vulnerable versions. python-modules.yml — the file flatpak-builder actually consumes — pinned pypdf 6.10.0 (17 CVEs, several in the untrusted-input PDF parser) and pillow 12.1.1 (26 CVEs in image decoders): ~43 CVEs in PDF/image parsing paths. It had also diverged from requirements-pinned.txt (pyside6/shiboken6 6.10.2 in the YAML vs 6.11.1 in the pinned file). Not published today, but grave if submitted to Flathub as-is.

What changed

File Before After
requirements.txt pillow>=12.1.1, pymupdf>=1.27.2.3 pillow>=12.3.0, pymupdf>=1.28.0
flatpak/requirements-pinned.txt pillow==12.2.0, pymupdf==1.27.2.3 pillow==12.3.0, pymupdf==1.28.0
flatpak/python-modules.yml pypdf 6.10.0, pillow 12.1.1, pymupdf 1.27.2, pyside6/shiboken6 6.10.2, qtawesome 1.4.1 pypdf 6.14.2, pillow 12.3.0, pymupdf 1.28.0, pyside6/shiboken6 6.11.1, qtawesome 1.4.2

python-modules.yml was regenerated with req2flatpak (--target-platforms 312-x86_64) against the updated requirements-pinned.txt, so the wheel URLs and sha256 are real, not hand-edited. Each of the six changed hashes was additionally cross-verified against the PyPI JSON API. The two files are now coherent on every version.

Regeneration still required before any Flathub submission

This PR removes the vulnerable pins and resolves the version divergence for the existing 8-package set, but the pre-existing gap documented in flatpak/README.md is not addressed here and remains a blocker for submission: requirements-pinned.txt / python-modules.yml are still missing cryptography, python-pptx, openpyxl, beautifulsoup4, ebooklib (added to requirements.txt in later releases). Before opening a Flathub PR, run the full req2flatpak regeneration on Linux per the README (adds the missing packages) and do a local flatpak-builder build test. No sha256 was invented anywhere in this change.

Validation

  • pytest -q: 475 passed, 2 skipped
  • pip_audit -r requirements.txt: No known vulnerabilities found
  • pip_audit -r flatpak/requirements-pinned.txt: No known vulnerabilities found
  • python -c "import yaml; yaml.safe_load(open('flatpak/python-modules.yml'))": valid, 8 sources
  • All six regenerated wheel hashes verified against the PyPI JSON API

🤖 Generated with Claude Code

…tpak pins

Shipped artefacts (Windows/MSIX/Snap) are clean because requirements.txt
resolves the >= floors to patched versions, but two gaps remained:

- requirements.txt had pillow>=12.1.1, whose lower bound still permitted the
  vulnerable 12.1.1 (26 CVEs in image decoders). Raise it to >=12.3.0 and
  bump pymupdf>=1.27.2.3 -> >=1.28.0 for hygiene.
- The dormant flatpak/ pinned vulnerable versions: python-modules.yml (the
  file flatpak-builder actually consumes) pinned pypdf 6.10.0 (17 CVEs, several
  in the untrusted-input PDF parser) and pillow 12.1.1, and diverged from
  requirements-pinned.txt (pyside6/shiboken6 6.10.2 vs 6.11.1). Regenerated with
  req2flatpak against the updated pinned file (target 312-x86_64); all wheel
  URLs/sha256 are real and verified against PyPI.

Regenerate flatpak/requirements-pinned.txt: pillow 12.2.0 -> 12.3.0,
pymupdf 1.27.2.3 -> 1.28.0 (pypdf already 6.14.2), keeping it coherent with
the regenerated python-modules.yml.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Python dependencies security check

pip-audit: requirements.txt

No known vulnerabilities.

pip-audit: flatpak/requirements-pinned.txt

No known vulnerabilities.

Outdated check (informational)

Package Pin Latest on PyPI Status
PySide6 PySide6>=6.11.1 6.11.1 up-to-date
pypdf pypdf>=6.14.2 6.14.2 up-to-date
cryptography cryptography>=49.0.0 49.0.0 up-to-date
qtawesome qtawesome>=1.4.2 1.4.2 up-to-date
pillow pillow>=12.3.0 12.3.0 up-to-date
pymupdf pymupdf>=1.28.0 1.28.0 up-to-date
pytesseract pytesseract>=0.3.13 0.3.13 up-to-date
python-docx python-docx>=1.2.0 1.2.0 up-to-date
python-pptx python-pptx>=1.0.2 1.0.2 up-to-date
openpyxl openpyxl>=3.1.5 3.1.5 up-to-date
beautifulsoup4 beautifulsoup4>=4.15.0 4.15.0 up-to-date
ebooklib ebooklib>=0.20 0.20 up-to-date
lxml lxml>=6.1.1 6.1.1 up-to-date
urllib3 urllib3>=2.7.0 2.7.0 up-to-date
idna idna>=3.18 3.18 up-to-date
pyinstaller pyinstaller>=6.21.0 6.21.0 up-to-date

Auto-generated by security-deps workflow. Merge is blocked only when pip-audit --strict reports vulnerabilities.

Bump the qtawesome lower bound in requirements.txt from >=1.4.1 to
>=1.4.2 to match the pinned flatpak manifests (requirements-pinned.txt
and python-modules.yml already use 1.4.2, the current PyPI latest).
Resolves the security-deps floor-drift report.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deploying pdfapps with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8e76f83
Status: ✅  Deploy successful!
Preview URL: https://7ae8b864.pdfapps.pages.dev
Branch Preview URL: https://fix-supply-chain-flatpak-pil.pdfapps.pages.dev

View logs

@nelsonduarte
nelsonduarte merged commit 6bcb108 into main Jul 28, 2026
5 checks passed
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.

1 participant