OPT: Update dependency zeep to v4.3.3 [SECURITY]#184
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #184 +/- ##
=======================================
Coverage 92.70% 92.70%
=======================================
Files 33 33
Lines 891 891
Branches 49 49
=======================================
Hits 826 826
Misses 47 47
Partials 18 18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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:
4.3.1→4.3.3Zeep: Server-Side Request Forgery (SSRF)
GHSA-4cc2-g9w2-fhf6
More information
Details
Summary
When parsing a WSDL or XSD document, python-zeep follows transitive references — xsd:import, xsd:include, wsdl:import, and lxml entity/DTD resolution — and will fetch http/https URLs found in those references. The Settings.forbid_external option, intended to disable this transitive remote fetching, was defined but not wired to any logic from version 4.0.0 through 4.3.2 (a regression introduced when zeep moved off defusedxml in 4.0). As a result, setting
forbid_external=Truehad no effect, and applications that processed untrusted or attacker-influenced WSDL/XSD documents could be coerced into making server-side requests to arbitrary URLs (SSRF).Impact
Server-Side Request Forgery (SSRF), CWE-918.
An attacker who can supply or influence the contents of a WSDL/XSD that an application loads with zeep can embed an import/include reference (e.g.
<xsd:import schemaLocation="http://169.254.169.254/...">) pointing at an internal or otherwise sensitive endpoint. When zeep parses the document it transitively fetches that URL using the configured transport, causing the application to issue outbound requests to attacker-chosen destinations. This can be used to reach internal-only services, cloud metadata endpoints, or other hosts not directly reachable by the attacker, and may disclose response timing/behaviour.Impacted users are those who:
forbid_external=Trueas a security control — in 4.0.0–4.3.2 that setting silently did nothing, so the protection users believed they had was not in effect.Note the default was (and remains)
forbid_external=False, i.e. transitive remote fetching is permitted by default; the security defect is specifically that the opt-out control was non-functional.Patches
Fixed in python-zeep 4.3.3. The forbid_external setting is now enforced: when set to True, zeep refuses to transitively fetch http/https resources via
xsd:import,xsd:include,wsdl:import, or lxml entity/DTD resolution, raisingzeep.exceptions.ExternalReferenceForbidden. The user-supplied entry-point WSDL/schema URL is still loaded.Affected versions: >= 4.0.0, < 4.3.3.
Upgrade to 4.3.3 (or later) and set forbid_external=True when loading documents from untrusted sources:
Workarounds
If you cannot upgrade to 4.3.3:
time.
cannot reach sensitive targets.
Severity
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
mvantellingen/python-zeep (zeep)
v4.3.3Compare Source
forbid_externalsetting (previously defined but unusedsince the move off
defusedxmlin 4.0). When enabled it refuses totransitively fetch
http/httpsresources viaxsd:import,xsd:include,wsdl:importor lxml entity resolution, raisingzeep.exceptions.ExternalReferenceForbidden. The user-suppliedentry-point WSDL/schema URL is still loaded. The default remains
Falseto preserve existing behaviour; enable when loading WSDLs fromuntrusted sources to mitigate SSRF via attacker-controlled import
targets.
replace isort/flake8/black with ruff. No runtime changes.
v4.3.2Compare Source
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.