chore(deps): update dependency mako to v1.3.11 [security]#16695
Open
renovate-bot wants to merge 1 commit intogoogleapis:mainfrom
Open
chore(deps): update dependency mako to v1.3.11 [security]#16695renovate-bot wants to merge 1 commit intogoogleapis:mainfrom
renovate-bot wants to merge 1 commit intogoogleapis:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==1.3.10→==1.3.11GitHub Vulnerability Alerts
GHSA-v92g-xgxw-vvmm
Summary
TemplateLookup.get_template()is vulnerable to path traversal when a URI starts with//(e.g.,//../../../secret.txt). The root cause is an inconsistency between two slash-stripping implementations:Template.__init__strips one leading/usingif/sliceTemplateLookup.get_template()strips all leading/usingre.sub(r"^\/+", "")When a URI like
//../../../../etc/passwdis passed:get_template()strips all/→../../../../etc/passwd→ file found viaposixpath.join(dir_, u)Template.__init__strips one/→/../../../../etc/passwd→normpath→/etc/passwd/etc/passwd.startswith(..) →False→ check bypassedImpact
Arbitrary file read: any file readable by the process can be returned as rendered template content when an application passes untrusted input directly to
TemplateLookup.get_template().Note: this is exploitable at the library API level. HTTP-based exploitation is mitigated by Python's
BaseHTTPRequestHandlerwhich normalizes double-slash prefixes since CPython gh-87389. Applications using other HTTP servers that do not normalize paths may be affected.Fix
Changed
Template.__init__to uselstrip("/")instead of stripping only a single leading slash, so both code paths handle leading slashes consistently.Severity
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:NConfiguration
📅 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.