Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update dependency pymdown-extensions to v10 [SECURITY] #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 28, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
pymdown-extensions ==9.7 -> ==10.0 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2023-32309

Summary

Arbitrary file read when using include file syntax.

Details

By using the syntax --8<--"/etc/passwd" or --8<--"/proc/self/environ" the content of these files will be rendered in the generated documentation. Additionally, a path relative to a specified, allowed base path can also be used to render the content of a file outside the specified base paths: --8<-- "../../../../etc/passwd".

Within the Snippets extension, there exists a base_path option but the implementation is vulnerable to Directory Traversal.
The vulnerable section exists in get_snippet_path(self, path) lines 155 to 174 in snippets.py.

base = "docs"
path = "/etc/passwd"
filename = os.path.join(base,path) # Filename is now /etc/passwd

PoC

import markdown

payload = "--8<-- \"/etc/passwd\""
html = markdown.markdown(payload, extensions=['pymdownx.snippets'])

print(html)

Impact

Any readable file on the host where the plugin is executing may have its content exposed. This can impact any use of Snippets that exposes the use of Snippets to external users.

It is never recommended to use Snippets to process user-facing, dynamic content. It is designed to process known content on the backend under the control of the host, but if someone were to accidentally enable it for user-facing content, undesired information could be exposed.

Suggestion

Specified snippets should be restricted to the configured, specified base paths as a safe default. Allowing relative or absolute paths that escape the specified base paths would need to be behind a feature switch that must be opt-in and would be at the developer's own risk.


Release Notes

facelessuser/pymdown-extensions (pymdown-extensions)

v10.0

Compare Source

10.0

  • Break: Snippets: snippets will restrict snippets to ensure they are under the base_path preventing snippets
    relative to the base_path but not explicitly under it. restrict_base_path can be set to False for legacy
    behavior.

v9.11

Compare Source

9.11

  • NEW: Emoji: Update to new CDN and use Twemoji 14.1.2.
  • NEW: Snippets: Ignore nested snippet section syntax when including a section.

v9.10

Compare Source

9.10
  • NEW: Blocks: Add new experimental general purpose blocks that provide a framework for creating fenced block
    containers for specialized parsing. A number of extensions utilizing general purpose blocks are included and are meant
    to be an alternative to (and maybe one day replace): Admonitions, Details, Definition Lists, and Tabbed. Also adds a
    new HTML plugin for quick wrapping of content with arbitrary HTML elements.
  • NEW: Highlight: When enabling line spans and/or line anchors, if a code block has an ID associated with it, line
    ids will be generated using that code ID instead of the code block count.
  • NEW: Snippets: Expand section syntax to allow section names with - and _.
  • NEW: Snippets: When check_paths is enabled, and a specified section is not found, raise an error.
  • NEW: Snippets: Add new experimental feature dedent_sections that will de-indent (remove any common leading
    whitespace from every line in text) from that block of text.
  • NEW: MagicLink: Update GitLab links to match recent changes and to be more correct.
  • NEW: MagicLink: Relax required hash length when performing link shortening.

v9.9.2

Compare Source

9.9.2
  • FIX: Snippets syntax can break in XML comments as XML comments do not allow --. Relax Snippets syntax such that
    -8<- (single -) are allowed.

v9.9.1

Compare Source

9.9.1
  • FIX: Use a different CDN for Twemoji icons as MaxCDN is no longer available.

v9.9

Compare Source

9.9
  • ENHANCE: BetterEm: Further improvements to strong/emphasis handling:
    • Ensure that one or more consecutive * or _ surrounded by whitespace are not considered as a token.
  • ENHANCE: Caret: Apply recent BetterEm improvements to Caret:
    • Fix case where ^^ nested between ^ would be handled in an unexpected way.
    • Ensure that one or more consecutive ^ surrounded by whitespace are not considered as a token.
  • ENHANCE: Tilde: Apply recent BetterEm improvements to Tilde:
    • Fix case where ~~ nested between ~ would be handled in an unexpected way.
    • Ensure that one or more consecutive ~ surrounded by whitespace are not considered a token.
  • ENHANCE: Mark: Apply recent BetterEm improvements to Mark:
    • Ensure that one or more consecutive = surrounded by whitespace are not considered a token.

v9.8

Compare Source

9.8
  • NEW: Formally declare support for Python 3.11.
  • FIX: BetterEm: Fix case where ** nested between * would be handled in an unexpected way.

Configuration

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

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, 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 requested a review from a team as a code owner May 28, 2023 09:55
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v9.11 [SECURITY] chore: Update dependency pymdown-extensions to v10 [SECURITY] May 28, 2023
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from de957ad to d8e8fc6 Compare May 28, 2023 12:42
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v10 [SECURITY] chore: Update dependency pymdown-extensions to v9.11 [SECURITY] Jun 18, 2023
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from d8e8fc6 to b1e3dcb Compare June 18, 2023 08:01
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v9.11 [SECURITY] chore: Update dependency pymdown-extensions to v10 [SECURITY] Jun 18, 2023
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from b1e3dcb to 7342b0a Compare June 18, 2023 10:06
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v10 [SECURITY] chore: Update dependency pymdown-extensions to v9.11 [SECURITY] Aug 9, 2023
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from 7342b0a to 1db801b Compare August 9, 2023 14:37
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v9.11 [SECURITY] chore: Update dependency pymdown-extensions to v10 [SECURITY] Aug 9, 2023
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from 1db801b to e92611b Compare August 9, 2023 17:43
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v10 [SECURITY] chore: Update dependency pymdown-extensions to v9.11 [SECURITY] Sep 19, 2023
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from e92611b to faf3e9f Compare September 19, 2023 15:01
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v9.11 [SECURITY] chore: Update dependency pymdown-extensions to v10 [SECURITY] Sep 19, 2023
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from faf3e9f to f0eda3d Compare September 19, 2023 19:08
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v10 [SECURITY] chore: Update dependency pymdown-extensions to v9.11 [SECURITY] Sep 26, 2023
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from f0eda3d to a622981 Compare September 26, 2023 12:28
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v9.11 [SECURITY] chore: Update dependency pymdown-extensions to v10 [SECURITY] Sep 26, 2023
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from a622981 to 9162dae Compare September 26, 2023 17:21
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v10 [SECURITY] chore: Update dependency pymdown-extensions to v9.11 [SECURITY] Nov 16, 2023
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch 2 times, most recently from ea7f088 to b870e18 Compare November 16, 2023 17:10
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v9.11 [SECURITY] chore: Update dependency pymdown-extensions to v10 [SECURITY] Nov 16, 2023
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v10 [SECURITY] chore: Update dependency pymdown-extensions to v9.11 [SECURITY] Dec 3, 2023
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from b870e18 to fdc9952 Compare December 3, 2023 12:08
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v9.11 [SECURITY] chore: Update dependency pymdown-extensions to v10 [SECURITY] Dec 3, 2023
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from fdc9952 to c38c24e Compare December 3, 2023 16:24
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from c38c24e to 6b72d91 Compare January 4, 2024 16:55
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v10 [SECURITY] chore: Update dependency pymdown-extensions to v9.11 [SECURITY] Jan 4, 2024
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from 6b72d91 to 9c17faa Compare January 4, 2024 19:39
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v10 [SECURITY] chore: Update dependency pymdown-extensions to v9.11 [SECURITY] Apr 14, 2024
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from 0073b01 to bc6fb1d Compare April 14, 2024 13:51
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v9.11 [SECURITY] chore: Update dependency pymdown-extensions to v10 [SECURITY] Apr 14, 2024
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from bc6fb1d to 14251c5 Compare May 1, 2024 14:38
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v10 [SECURITY] chore: Update dependency pymdown-extensions to v9.11 [SECURITY] May 1, 2024
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from 14251c5 to 4c602ed Compare May 1, 2024 16:46
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v9.11 [SECURITY] chore: Update dependency pymdown-extensions to v10 [SECURITY] May 1, 2024
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from 4c602ed to f1c5d22 Compare May 9, 2024 08:48
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v10 [SECURITY] chore: Update dependency pymdown-extensions to v9.11 [SECURITY] May 9, 2024
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from f1c5d22 to f3ef219 Compare May 9, 2024 10:16
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v9.11 [SECURITY] chore: Update dependency pymdown-extensions to v10 [SECURITY] May 9, 2024
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from f3ef219 to 5df5d17 Compare May 15, 2024 17:15
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v10 [SECURITY] chore: Update dependency pymdown-extensions to v9.11 [SECURITY] May 15, 2024
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v9.11 [SECURITY] chore: Update dependency pymdown-extensions to v10 [SECURITY] May 16, 2024
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from 5df5d17 to 8bfc8c2 Compare May 16, 2024 00:42
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from 8bfc8c2 to ab8f008 Compare June 27, 2024 11:11
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v10 [SECURITY] chore: Update dependency pymdown-extensions to v9.11 [SECURITY] Jun 27, 2024
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v9.11 [SECURITY] chore: Update dependency pymdown-extensions to v10 [SECURITY] Jun 27, 2024
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from ab8f008 to e817a06 Compare June 27, 2024 14:25
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from e817a06 to b73219e Compare July 14, 2024 08:01
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v10 [SECURITY] chore: Update dependency pymdown-extensions to v9.11 [SECURITY] Jul 14, 2024
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from b73219e to 21aaae8 Compare July 14, 2024 11:56
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v9.11 [SECURITY] chore: Update dependency pymdown-extensions to v10 [SECURITY] Jul 14, 2024
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v10 [SECURITY] chore: Update dependency pymdown-extensions to v9.11 [SECURITY] Jul 28, 2024
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch 2 times, most recently from 1baa4b6 to 96f867f Compare July 28, 2024 17:12
@renovate renovate bot changed the title chore: Update dependency pymdown-extensions to v9.11 [SECURITY] chore: Update dependency pymdown-extensions to v10 [SECURITY] Jul 28, 2024
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from 96f867f to 892cbd5 Compare August 6, 2024 16:13
@renovate renovate bot force-pushed the renovate/pypi-pymdown-extensions-vulnerability branch from 892cbd5 to 6b14fb2 Compare August 7, 2024 12:53
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.

None yet

0 participants