Skip to content

chore: dep security audit 2026-05 — patch 6/13 CVEs#16

Open
forkni wants to merge 2 commits into
SDTD_031_devfrom
security/dep-audit-2026-05
Open

chore: dep security audit 2026-05 — patch 6/13 CVEs#16
forkni wants to merge 2 commits into
SDTD_031_devfrom
security/dep-audit-2026-05

Conversation

@forkni
Copy link
Copy Markdown
Collaborator

@forkni forkni commented May 24, 2026

Summary

  • Patches 6 of 13 CVEs found in the 2026-05-23 pip-audit scan
  • Documents the onnx 1.19.1 pin constraint and the 7 deferred CVEs
  • No functional code changes; setup.py comment-only

Changes

setup.pyonnx==1.19.1 comment updated to document:

  • Why the pin can't be bumped to 1.21.0: external-data loading rewrite breaks FP8 quantization (assert scale >= 0 in onnxruntime/quantization/quant_utils.py)
  • That the 6 onnx path-traversal CVEs are accepted risk (require loading untrusted ONNX models; pipeline uses trusted HuggingFace sources only)

CVEs fixed (venv already patched)

Package Old New CVEs
idna 3.13 3.16 CVE-2026-45409
Mako 1.3.11 1.3.12 CVE-2026-44307
urllib3 2.6.3 2.7.0 CVE-2026-44432, CVE-2026-44431
pip 26.0.1 26.1.1 CVE-2026-3219, CVE-2026-6357

CVEs deferred

  • onnx (6 CVEs): pin locked at 1.19.1 — FP8 quant incompatibility confirmed via full engine rebuild test
  • protobuf (1 CVE-2026-0994): blocked by mediapipe<5 ceiling

Installer

Security floor pins for idna/Mako/urllib3 committed to StreamDiffusion-installer repo (separate PR).

Test plan

  • FP8 engine rebuild passed with onnx 1.19.1 after failed attempt with 1.21.0
  • pip check — no new conflicts
  • pip-audit after-fixes: 13 → 7 CVEs (audit_reports/2026-05-23-after-rollback.md)

🤖 Generated with Claude Code

forkni and others added 2 commits May 23, 2026 21:05
onnx 1.19.1 is pinned by two constraints:
1. modelopt FLOAT4E2M1 support requires onnx >=1.18 (IR 11)
2. onnx 1.21.0 breaks FP8 quantization: the external-data loading
   rewrite (CVE fixes) corrupts weight initializer values read by
   modelopt/onnxruntime, producing a negative QDQ scale and triggering
   assert scale >= 0 in onnxruntime/quantization/quant_utils.py.

The 6 path-traversal/symlink CVEs in onnx (1.19.x) require loading
untrusted ONNX models — accepted risk for this local pipeline that
builds engines from trusted HuggingFace sources only.

Safe dep updates applied in venv (idna 3.16, Mako 1.3.12, urllib3 2.7.0,
pip 26.1.1) fix 6 of 13 audit CVEs. Installer floor pins tracked in
StreamDiffusion-installer repo.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add _get_spaced_timesteps() to pipeline.py: ports paper Table 2 trailing/
  linspace/leading formulas; LCM/TCD schedulers stored timestep_spacing in
  config but never consumed it in set_timesteps (always linear grid)
- Activate spacing override in prepare() gated on _SPACING_SAMPLERS so
  'normal' is untouched; override flows through sub_timesteps_tensor to
  the img2img denoising path
- Rekey sampler_config: 'sgm uniform' (space) -> 'sgm_uniform'; add no-op
  comments for beta/karras (neither LCM nor TCD has karras-sigma logic)
- Update Literal hints in pipeline.py + wrapper.py to match new key
- Fix unet_step non-SDXL branch: always passed kvo_cache= to UNet, but
  that kwarg only exists on the TRT UNet; add _check_unet_tensorrt() gate
  (production always TRT so this was never hit; exposed by acceleration=none)
- Fix txt2img_sd_turbo non-SDXL: UNet tuple return was not indexed [0]
  (same TRT vs PyTorch mismatch, same acceleration=none exposure)
- Add examples/txt2img/spacing_compare.py: S=10-30 sweep confirms sgm_uniform
  is indistinguishable from normal at all production step counts (MSE<=10);
  ddim/simple produce visible shifts (MSE 30-222) at cost of going off-grid

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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