chore(deps): update dependency pymdown-extensions to v11 [security] - #423
chore(deps): update dependency pymdown-extensions to v11 [security]#423renovate[bot] wants to merge 1 commit into
Conversation
|
Overview
Policies (1 improved, 1 worsened, 3 missing data)
Packages and Vulnerabilities (107 package changes and 13 vulnerability changes)
Changes for packages of type
|
| Package | Versiondjaytan/papermc-server:1.21.11 |
Versiondjaytan/papermc-server:test |
|
|---|---|---|---|
| ➕ | openjdk | 21.0.10 |
|
| ➖ | openjdk | 21.0.10 |
Changes for packages of type golang (20 changes)
| Package | Versiondjaytan/papermc-server:1.21.11 |
Versiondjaytan/papermc-server:test |
|
|---|---|---|---|
| ➕ | cuelabs.dev/go/oci/ociregistry | 0.0.0-20250304105642-27e071d2c9b1 |
|
| ➖ | cuelabs.dev/go/oci/ociregistry | 0.0.0-20250304105642-27e071d2c9b1 |
|
| ➖ | github.com/cenkalti/backoff/v5 | 5.0.3 |
|
| ➕ | github.com/cenkalti/backoff/v5 | 5.0.3 |
|
| ➖ | github.com/cespare/xxhash/v2 | 2.3.0 |
|
| ➕ | github.com/cespare/xxhash/v2 | 2.3.0 |
|
| ➕ | github.com/cockroachdb/apd/v3 | 3.2.1 |
|
| ➖ | github.com/cockroachdb/apd/v3 | 3.2.1 |
|
| ➖ | github.com/grpc-ecosystem/grpc-gateway/v2 | 2.27.7 |
|
| ➕ | github.com/grpc-ecosystem/grpc-gateway/v2 | 2.27.7 |
|
| ➖ | github.com/pelletier/go-toml/v2 | 2.2.4 |
|
| ➕ | github.com/pelletier/go-toml/v2 | 2.2.4 |
|
| ➖ | go.opentelemetry.io/contrib/instrumentation/runtime | 0.65.0 |
|
| ➕ | go.opentelemetry.io/contrib/instrumentation/runtime | 0.65.0 |
|
| ➖ | go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc | 1.40.0 |
|
| ➕ | go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc | 1.40.0 |
|
| ➖ | go.opentelemetry.io/otel/sdk/metric | 1.40.0 |
|
| ➖ | google.golang.org/genproto/googleapis/api | 0.0.0-20260203192932-546029d2fa20 |
|
| ➕ | google.golang.org/genproto/googleapis/rpc | 0.0.0-20260203192932-546029d2fa20 |
|
| ➖ | google.golang.org/genproto/googleapis/rpc | 0.0.0-20260203192932-546029d2fa20 |
Changes for packages of type maven (76 changes)
🔍 Vulnerabilities of
|
| digest | sha256:0f5f372484a22afed7ef08e101d9f9db9264054f6c83797a46360ad761a3c8a1 |
| vulnerabilities | |
| platform | linux/amd64 |
| size | 147 MB |
| packages | 176 |
📦 Base Image alpine:3
| also known as |
|
| digest | sha256:59855d3dceb3ae53991193bd03301e082b2a7faa56a514b03527ae0ec2ce3a95 |
| vulnerabilities |
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
Description
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
Description
Description
Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7ba4bcf to
19e4476
Compare
19e4476 to
f4d8319
Compare
|



This PR contains the following updates:
==10.16.1→==11.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Regression in pymdownx.snippets reintroduces sibling-prefix path traversal bypass despite restrict_base_path
CVE-2026-46338 / GHSA-62q4-447f-wv8h / PYSEC-2026-2999
More information
Details
Summary
pymdownx.snippetshas a regression of the CVE-2023-32309 / GHSA-jh85-wwv9-24hv fix. Withrestrict_base_path: True(the default), the currentfilename.startswith(base)containment check does not enforce a directory boundary. As a result, a markdown snippet directive can read files from sibling paths that share the same prefix asbase_path, such asdocsvsdocs_internal.The regression was introduced in PR #2039 / commit
7c13bda5b7793b172efd1abb6712e156a83fe07d, which replaced the original directory-identity check with a plain string-prefix comparison.Details
The regression was introduced in commit
7c13bda5b7793b172efd1abb6712e156a83fe07d(2023-05-15, #2039 "Fix regression of snippets nested deeply under specified base path"), which relaxed the originalos.path.samefile(base, os.path.dirname(filename))check to a plainstartswith(base).SnippetPreprocessor.get_snippet_path()inpymdownx/snippets.py:baseisos.path.abspath(b)and has no trailing separator.str.startswith(base)isTruefor anyfilenamewhose string representation begins with the same characters asbase, regardless of whether those characters end at a directory boundary.Concrete example:
base = "/x/docs"path = "../docs_secret/leak.txt"(inside the markdown snippet directive)os.path.join(base, path)→"/x/docs/../docs_secret/leak.txt"os.path.abspath(...)→"/x/docs_secret/leak.txt"filename.startswith(base)→True, because"/x/docs_secret/..."begins with the literal string"/x/docs".All releases from 10.0.1 (2023-05-15) through 10.21.2 (current) are affected.
Impact
Arbitrary file read within the host the build runs on, bounded by the prefix match. With
base_path = /x/docsthe attacker can read files from any sibling directory whose path begins with the literal string/x/docsfollowed by any non-separator character — for example/x/docs_internal/,/x/docs.bak/,/x/docs2/.The threat model is the same as the original CVE-2023-32309: markdown content processed by the snippets preprocessor in a build pipeline (typical scenario: an MkDocs documentation site built in CI from PR contributions or otherwise less-trusted markdown) can read files outside the configured base. CI builds that publish the generated HTML expose the read file to the public; CI builds with secrets on disk leak those secrets.
Reproduction
Minimal local PoC, non-destructive:
Default
restrict_base_path: Trueis sufficient — no non-default option is required.Suggested fix
Minimal change — require the separator after the base prefix:
This preserves the original intent (allow snippets nested at any depth under
base_path) while restoring the directory-boundary check. It does not affect theos.path.isdir(base)branch wherebaseis a file (that branch still usesos.path.samefile).Alternative:
os.path.commonpath([base, filename]) == baseis equivalent and slightly more idiomatic, though it raisesValueErroron different drives on Windows and would need atry/except. Thestartswith(base + os.sep)fix is the smaller diff.Note: this fix does not change behaviour for symlinks inside
base_path. The existing implementation usesos.path.abspath(notos.path.realpath), so a symlink withinbase_pathpointing outside is still followed. That is a separate concern — symlinks require write access tobase_path, a much higher bar than the current bypass — and matches the behaviour the CVE-2023 fix established.Regression test
A regression test class
TestSnippetsSiblingPrefixwas added intests/test_extensions/test_snippets.py. It usestests/test_extensions/_snippets/nestedasbase_pathand a new fixture directorytests/test_extensions/_snippets/nested_sibling_evil/leak.txt. It asserts that the markdown directive--8<-- "../nested_sibling_evil/leak.txt"raisesSnippetMissingError.AssertionError: SnippetMissingError not raised, sibling file is silently read).Full suite:
python -m pytest tests/ -q→ 738 passed (737 baseline + 1 new regression test). No regressions.Affected versions
>= 10.0.1, <= 10.21.2Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Regression in pymdownx.snippets reintroduces sibling-prefix path traversal bypass despite restrict_base_path
CVE-2026-46338 / GHSA-62q4-447f-wv8h / PYSEC-2026-2999
More information
Details
Summary
pymdownx.snippetshas a regression of the CVE-2023-32309 / GHSA-jh85-wwv9-24hv fix. Withrestrict_base_path: True(the default), the currentfilename.startswith(base)containment check does not enforce a directory boundary. As a result, a markdown snippet directive can read files from sibling paths that share the same prefix asbase_path, such asdocsvsdocs_internal.The regression was introduced in PR #2039 / commit
7c13bda5b7793b172efd1abb6712e156a83fe07d, which replaced the original directory-identity check with a plain string-prefix comparison.Details
The regression was introduced in commit
7c13bda5b7793b172efd1abb6712e156a83fe07d(2023-05-15, #2039 "Fix regression of snippets nested deeply under specified base path"), which relaxed the originalos.path.samefile(base, os.path.dirname(filename))check to a plainstartswith(base).SnippetPreprocessor.get_snippet_path()inpymdownx/snippets.py:baseisos.path.abspath(b)and has no trailing separator.str.startswith(base)isTruefor anyfilenamewhose string representation begins with the same characters asbase, regardless of whether those characters end at a directory boundary.Concrete example:
base = "/x/docs"path = "../docs_secret/leak.txt"(inside the markdown snippet directive)os.path.join(base, path)→"/x/docs/../docs_secret/leak.txt"os.path.abspath(...)→"/x/docs_secret/leak.txt"filename.startswith(base)→True, because"/x/docs_secret/..."begins with the literal string"/x/docs".All releases from 10.0.1 (2023-05-15) through 10.21.2 (current) are affected.
Impact
Arbitrary file read within the host the build runs on, bounded by the prefix match. With
base_path = /x/docsthe attacker can read files from any sibling directory whose path begins with the literal string/x/docsfollowed by any non-separator character — for example/x/docs_internal/,/x/docs.bak/,/x/docs2/.The threat model is the same as the original CVE-2023-32309: markdown content processed by the snippets preprocessor in a build pipeline (typical scenario: an MkDocs documentation site built in CI from PR contributions or otherwise less-trusted markdown) can read files outside the configured base. CI builds that publish the generated HTML expose the read file to the public; CI builds with secrets on disk leak those secrets.
Reproduction
Minimal local PoC, non-destructive:
Default
restrict_base_path: Trueis sufficient — no non-default option is required.Suggested fix
Minimal change — require the separator after the base prefix:
This preserves the original intent (allow snippets nested at any depth under
base_path) while restoring the directory-boundary check. It does not affect theos.path.isdir(base)branch wherebaseis a file (that branch still usesos.path.samefile).Alternative:
os.path.commonpath([base, filename]) == baseis equivalent and slightly more idiomatic, though it raisesValueErroron different drives on Windows and would need atry/except. Thestartswith(base + os.sep)fix is the smaller diff.Note: this fix does not change behaviour for symlinks inside
base_path. The existing implementation usesos.path.abspath(notos.path.realpath), so a symlink withinbase_pathpointing outside is still followed. That is a separate concern — symlinks require write access tobase_path, a much higher bar than the current bypass — and matches the behaviour the CVE-2023 fix established.Regression test
A regression test class
TestSnippetsSiblingPrefixwas added intests/test_extensions/test_snippets.py. It usestests/test_extensions/_snippets/nestedasbase_pathand a new fixture directorytests/test_extensions/_snippets/nested_sibling_evil/leak.txt. It asserts that the markdown directive--8<-- "../nested_sibling_evil/leak.txt"raisesSnippetMissingError.AssertionError: SnippetMissingError not raised, sibling file is silently read).Full suite:
python -m pytest tests/ -q→ 738 passed (737 baseline + 1 new regression test). No regressions.Affected versions
>= 10.0.1, <= 10.21.2Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:NReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
PyMdown Extensions: Path traversal in the b64 extension lets
read files outside base_path
CVE-2026-61632 / GHSA-9xwg-3r6f-jcx2
More information
Details
Summary
The
b64extension inlines images referenced by<img src="...">as base64 data URIs. When resolving thesrcpath it joins it onto the configuredbase_pathwithos.path.normpathand opens the result directly, with no check that the resolved path stays insidebase_path. Asrccontaining../sequences, or an absolute path, therefore reads a file outsidebase_pathas long as that file has an allowed image extension (.png,.jpg,.jpeg,.gif,.svg). The base64 of that file is then embedded in the rendered output, disclosing its contents.This is a separate code path from the
snippetstraversal issues (GHSA-jh85-wwv9-24hv, GHSA-62q4-447f-wv8h). It lives inpymdownx/b64.pyand has no path restriction of any kind. Confirmed on10.21.3installed from PyPI.Details
In
pymdownx/b64.py, functionrepl_path(around lines 68 to 90 onmain):There is no
startswith(base_path), noos.path.realpathcomparison, and no rejection of... Both branches are reachable from an attacker-controlledsrc.PoC
Reproduced against an unmodified
pymdown-extensions==10.21.3from PyPI. The script creates abase_pathdirectory and a PNG one level above it, then renders Markdown whose imagesrcpoints outsidebase_path, and confirms the outside file's bytes appear base64-encoded in the output.Output:
The base64 of a file outside
base_pathis present in the output. The absolute-path branch behaves the same way: an absolutesrcbypassesbase_pathentirely viaos.path.normpath(path). Both were confirmed leaking.Impact
An application that renders untrusted Markdown with
pymdownx.b64enabled exposes the contents of image-extension files on the server, or any path the process can read, to whoever controls the Markdown and whoever views the output. The reach is bounded by the image-extension check, so it is a targeted file read rather than full arbitrary read, but it still discloses file contents that were never meant to be exposed.Suggested fix
Resolve the real path and require it to stay within
base_pathbefore opening:The same containment check should apply to the absolute-path branch rather than trusting an absolute
src. Usingrealpathinstead ofabspathalso closes the related symlink-following gap in the snippets handler.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Release Notes
facelessuser/pymdown-extensions (pymdown-extensions)
v11.0Compare Source
11.0
base_pathby default. Can be disabled by setting newrestrict_pathoption to
False. The newroot_pathcan be specified if paths are desired to be restricted to a differentlocation separate
base_pathwhich is also used as a relative base for image paths.v10.21.3Compare Source
10.21.3
restrict_base_pathis enabled (the default). Found by @gistrec.v10.21.2: 10.21. 2Compare Source
10.21.2
None.v10.2110.21
@joapuiib.
v10.20Compare Source
10.20
NEW: Quotes: New blockquotes extension added that uses a more modern approach when compared to Python Markdown's
default. Quotes specifically will not group consecutive blockquotes together in the same lazy fashion that the
default Python Markdown does which follows a more modern trend to how parsers these days handle block quotes.
In addition, Quotes also provides an optional feature to enable specifying callouts/alerts in the style used by
GitHub and Obsidian.
v10.19.1Compare Source
10.19.1
$$math used inline within a paragraph could result in nested mathparsing.
v10.19Compare Source
10.19
viewmode deprecation as some still like to use it, though further enhancements to thismode are not planned.
v10.18Compare Source
10.18
viewmode has been deprecated. To avoid warnings or future issues, explicitly setmodetoeither
acceptorreject. In the future, the new default will beacceptand theviewmode will be removedentirely.
importantshould have always been available as a default.v10.17.2Compare Source
10.17.2
and other non-conflicting blocks.
v10.17.1Compare Source
10.17.1
v10.17Compare Source
10.17
#idsyntax.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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.
This PR was generated by Mend Renovate. View the repository job log.