Skip to content

chore(deps): update dependency pymdown-extensions to v10.16.1 [security]#25

Merged
renovate[bot] merged 1 commit intodevelopfrom
renovate/pypi-pymdown-extensions-vulnerability
Mar 15, 2026
Merged

chore(deps): update dependency pymdown-extensions to v10.16.1 [security]#25
renovate[bot] merged 1 commit intodevelopfrom
renovate/pypi-pymdown-extensions-vulnerability

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Jan 22, 2026

This PR contains the following updates:

Package Change Age Confidence
pymdown-extensions 10.1310.16.1 age confidence

GitHub Vulnerability Alerts

CVE-2025-68142

Impact

This issue describes a ReDOS bug found within the figure caption extension (pymdownx.blocks.caption ).

In systems that take unchecked user content, this could cause long hangs when processing the data if a malicious payload was crafted.

Patches

This issue is patched in Release 10.16.1.

Workarounds

Some possible workarounds

If users are concerned about this vulnerability and process unknown user content without timeouts or other safeguards in place to prevent really large, malicious content being aimed at systems, the use of pymdownx.blocks.caption could be avoided until the library is updated to 10.16.1+.

References

The original issue https://github.com/facelessuser/pymdown-extensions/issues/2716.

Description

The original issue came through PyMdown Extensions' normal issue tracker instead of the typical security flow: https://github.com/facelessuser/pymdown-extensions/issues/2716. Because this came through the normal issue flow, it was handled as a normal issue. In the future, PyMdown Extensions will ensure such issues, even if prematurely made public through the normal issue flow, are redirected through the typical security process.

The regular expression pattern in question is as follows:

RE_FIG_NUM = re.compile(r'^(\^)?([1-9][0-9]*(?:.[1-9][0-9]*)*)(?= |$)')

The POC was provided by @​ShangzhiXu

import re
import time

regex_pattern = re.compile(r'^(\^)?([1-9][0-9]*(?:.[1-9][0-9]*)*)(?= |$)')

for i in range(50, 500, 50):
    long_string = '1' * i + 'a'
    start_time = time.time()
    match = re.match(regex_pattern, long_string)
    end_time = time.time()
    print(f"long_string execution time: {end_time - start_time:.6f} s")

The issue with the above pattern is that . was used, which accepts any character when we meant to use \.. The fix was to update the pattern to:

RE_FIG_NUM = re.compile(r'^(\^)?([1-9][0-9]*(?:\.[1-9][0-9]*)*)(?= |$)')

Relevant PR with fix: https://github.com/facelessuser/pymdown-extensions/pull/2717

Version(s) & System Info

  • Operating System: Any
  • Python Version: Any

Release Notes

facelessuser/pymdown-extensions (pymdown-extensions)

v10.16.1: 10.6.1

Compare Source

10.16.1

  • FIX: Inefficient regular expression pattern for figure caption numbers.

v10.16

Compare Source

10.16

  • NEW: Add early support for Python 3.14.
  • NEW: Drop support for Python 3.8.
  • NEW: Snippets: Added max_retries and backoff_retries options to configure new retry logic for HTTP 429
    errors (Too Many Requests client error).
  • NEW: Caption: Prefix templates are now preserved exactly as specified allowing the insertion of HTML tags if
    desired.
  • FIX: Caption: Fix issue where manual numbers in auto were not respected appropriately.

v10.15

Compare Source

10.15.0

  • NEW: SuperFences: Add relaxed_headers option which can tolerate bad content in the fenced code header. When
    enabled, code blocks with bad content in the header will likely still convert into code blocks, often respecting
    the specified language.
  • NEW: Add type hints to the Blocks interface and a few additional files.
  • FIX: Blocks: Fix some corner cases of nested blocks with lists.
  • FIX: Tab and Tabbed: Fix a case where tabs could fail if combine_header_slug was enabled and there was no
    header.

v10.14.3

Compare Source

10.14.3

  • FIX: Blocks: An empty, raw block type should not cause an error.

v10.14.2

Compare Source

10.14.2

  • FIX: Blocks: Fix some corner cases with md_in_html.

v10.14.1

Compare Source

10.14.1

  • FIX: MagicLink: Ensure that repo names that start with . are handled correctly.
  • FIX: FancyLists: Fix case were lists could be falsely created when a line started with . or ).

v10.14

Compare Source

10.14

  • NEW: Blocks.HTML: Add new custom option to specify tags and the assumed handling for them when automatic mode
    is assumed. This can also be used to override the handling for recognized tags with automatic handling.
  • FIX: Fix tests to pass with Pygments 2.19+.

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from 3c00f5c to 070c541 Compare February 2, 2026 17:57
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from 070c541 to 476c7e2 Compare March 13, 2026 11:43
NiklasRosenstein added a commit that referenced this pull request Mar 15, 2026
## Summary

This PR wires up fully-automatic maintenance for the repo so that open
security PRs merge themselves and a new PyPI release follows
automatically.

### 1. `renovate.json` — automerge for Renovate PRs

- **Security updates** (`matchCategories: ["security"]`): automerged
immediately with highest priority. This will finally close the 4
long-standing security PRs (#21, #24, #25, #27).
- **Minor/patch updates**: automerged after a 3-day stabilisation period
(grouped).
- `platformAutomerge: true` — uses GitHub's native auto-merge so it
respects branch protection rules.
- Adds a `dependencies` label to all Renovate PRs for easy filtering.

### 2. `pyproject.toml` — loosen overly tight dependency pins

The previous constraints had patch-level upper bounds that directly
blocked the open Renovate PRs:

| Dep | Before | After |
|---|---|---|
| `cryptography` | `>=44.0.0,<44.0.1` | `>=44.0.0` |
| `urllib3` | `>=2.6.3,<2.6.4` | `>=2.6.3` |

`PyJWT<3.0.0` and `requests<3.0.0` are intentional major-version guards
and are left as-is.

### 3. `.github/workflows/auto-release.yml` — automatic version tagging

After the existing **Python CI** workflow passes on `develop`, this
workflow:

**Path A — unreleased commits exist (e.g. after Renovate PRs merge):**
1. Auto-bumps the patch version in `pyproject.toml` and `__init__.py`
2. Generates a `.changelog/<new_version>.toml` entry summarising the
merged commits
3. Pushes the commit + tag → triggers `release.yml` → publishes to PyPI

**Path B — version was manually bumped in a PR:**
1. Checks that a `.changelog/<version>.toml` entry exists
2. If so, tags the version → triggers `release.yml`

> **Note:** The auto-release commit is pushed with a `RELEASE_TOKEN`
secret (falls back to `GITHUB_TOKEN`). For the tag push to trigger
`release.yml`, a PAT stored as `RELEASE_TOKEN` is needed (pushes via
`GITHUB_TOKEN` do not trigger further workflows). If you don't have one
set up, you can add a fine-grained PAT with `contents: write` scope.

## Test plan

- [ ] Merge this PR
- [ ] Verify Renovate re-evaluates the open security PRs and enables
auto-merge on them
- [ ] Confirm that once a security PR merges and CI passes,
`auto-release.yml` runs and a new patch tag appears
- [ ] Confirm `release.yml` picks up the tag and publishes to PyPI

Co-authored-by: Claude Sonnet 4.6 <[email protected]>
@renovate renovate bot merged commit adc5bb1 into develop Mar 15, 2026
5 checks passed
@renovate renovate bot deleted the renovate/pypi-pymdown-extensions-vulnerability branch March 15, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants