Skip to content

fix(deps): bump mistune and pydantic-settings for CVEs - #83

Merged
geopanther merged 2 commits into
mainfrom
build/bump-deps
Jul 27, 2026
Merged

fix(deps): bump mistune and pydantic-settings for CVEs#83
geopanther merged 2 commits into
mainfrom
build/bump-deps

Conversation

@geopanther

Copy link
Copy Markdown
Owner

No ticket reference was provided for this PR.

Summary

Bumps mistune (3.2.1 → 3.3.x) and pydantic-settings (2.14.0 → 2.14.2) to resolve 11 known vulnerabilities flagged by osv-scanner, and adapts the code to mistune 3.3.x API changes. Also fixes the dev-setup instructions in CONTRIBUTING.

Changes

  • Security bumps (committed together so no intermediate lockfile stays vulnerable):
    • mistune >= 3.3.0 — resolves 10 CVEs (up to CVSS 8.7)
    • pydantic-settings >= 2.14.2 — resolves GHSA-4xgf-cpjx-pc3j (symlink escape)
  • mistune 3.3.x API adaptation:
    • Extend the inline_math override regex with display_math_text / backtick_math_text groups (parse_inline_math now probes them first); adopt native (?!\s) so a leading-space $ x + y $ is no longer treated as math
    • Unpack the new third return value from extract_block_quote in the alerts plugin
    • Update test to assert leading-space math is rejected
  • Docs: fix broken venv setup steps in CONTRIBUTING.

Tests performed

  • pytest test_package — 179 passed
  • pre-commit hooks (incl. osv-scanner, gitlint, ruff) pass on both commits

Resolve 11 known vulnerabilities flagged by osv-scanner:
- mistune 3.2.1: 10 CVEs (up to CVSS 8.7), fixed in 3.3.0
- pydantic-settings 2.14.0: GHSA-4xgf-cpjx-pc3j (symlink escape),
  fixed in 2.14.2

Both bumps are committed together so no intermediate commit leaves a
vulnerable lockfile. The mistune upgrade also rewrote parse_inline_math to
probe display_math_text and backtick_math_text groups first, and
extract_block_quote now returns a 3-tuple, both of which broke mdfluence.

- Bump mistune >=3.3.0 and add pydantic-settings >=2.14.2 (pyproject, uv.lock)
- Extend inline_math override regex with display/backtick math groups; adopt
  native (?!\s) so leading-space $ x + y $ is no longer treated as math
- Unpack the third return value from extract_block_quote in alerts plugin
- Update test to assert leading-space math is rejected
@geopanther
geopanther merged commit bf1da61 into main Jul 27, 2026
5 checks passed
@geopanther
geopanther deleted the build/bump-deps branch July 27, 2026 16:59
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