Vulnerabilities in pkg:pypi/zeep

PACKAGE
Advisory Summary

GHSA-4cc2-g9w2-fhf6 is a MODERATE (CVSS 5.9) server-side request forgery (ssrf) vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Zeep libraries in the PyPI ecosystem. The issue involves server-side request forgery (ssrf). Remediation is available by upgrading affected packages to version 4.3.3.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/zeep

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/zeep. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-4cc2-g9w2-fhf6 - MODERATE Zeep: Server-Side Request Forgery (SSRF)

GHSA-4cc2-g9w2-fhf6 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-4cc2-g9w2-fhf6
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product Zeep
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.9

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-4cc2-g9w2-fhf6

To remediate this vulnerability, upgrade all affected Zeep dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

zeep fixed: 4.3.3
pip install zeep>=4.3.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show zeep

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-4cc2-g9w2-fhf6, inspect your installed packages using pip:

pip show zeep

Analyze the terminal output to locate any version of Zeep in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.3.3), your application is affected.

Note: The pip show zeep command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Zeep, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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=True` had 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: - load WSDL/XSD documents that are untrusted or whose import targets an attacker can control, and/or - relied on `forbid_external=True` as 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, raising `zeep.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: ```python from zeep import Client, Settings settings = Settings(forbid_external=True) client = Client("https://untrusted.example/service?wsdl", settings=settings) ``` ## Workarounds If you cannot upgrade to 4.3.3: - Do not load untrusted WSDL/XSD documents, and avoid loading WSDLs whose import/include targets can be influenced by untrusted input. - Vendor the schema locally: pre-fetch and review the WSDL and all of its imported schemas, then load them from local files (e.g. file:// paths) so no remote fetching occurs at parse time. - Restrict egress at the network layer: block outbound traffic from the host/process to internal ranges and metadata endpoints (e.g. 169.254.169.254, RFC1918 ranges) so SSRF attempts cannot reach sensitive targets. - Use a restrictive custom Transport: subclass the zeep transport and reject/allow-list URLs in load() so disallowed hosts are never fetched.

GHSA-4cc2-g9w2-fhf6 Affected Zeep Versions

1 component(s)
Fixed Versions:
4.3.3
Product / Package Ecosystem Affected Versions Fixed Version
zeep
PyPI
≥ 4.0.0
< 4.3.3
4.3.3

References

Frequently Asked Questions

What is GHSA-4cc2-g9w2-fhf6?
GHSA-4cc2-g9w2-fhf6 is a security vulnerability in Zeep involving Server-Side Request Forgery (SSRF) under CWE-918: Server-Side Request Forgery (SSRF).
Which Zeep versions are affected?
Affected versions include releases prior to 4.3.3 across affected packages: zeep.
What version fixes GHSA-4cc2-g9w2-fhf6?
Upgrading to 4.3.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zeep affected?
Yes, zeep is affected in releases prior to 4.3.3. Upgrade your dependency to 4.3.3 or later.
What is the CVSS score of GHSA-4cc2-g9w2-fhf6?
GHSA-4cc2-g9w2-fhf6 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with GHSA-4cc2-g9w2-fhf6?
GHSA-4cc2-g9w2-fhf6 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check PyPI dependencies for GHSA-4cc2-g9w2-fhf6?
Run the dependency tree command: 'pip show zeep'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4cc2-g9w2-fhf6",
  "modified" : "2026-06-19T22:10:26Z",
  "published" : "2026-06-19T22:10:26Z",
  "aliases" : [ ],
  "summary" : "Zeep: Server-Side Request Forgery (SSRF)",
  "details" : "## Summary\n\nWhen 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=True` had 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).\n\n## Impact\n\nServer-Side Request Forgery (SSRF), CWE-918.\n\nAn 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.\n\nImpacted users are those who:\n\n- load WSDL/XSD documents that are untrusted or whose import targets an attacker can control, and/or\n- relied on `forbid_external=True` as 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.\n\nNote 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.\n\n## Patches\n\nFixed 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, raising `zeep.exceptions.ExternalReferenceForbidden`. The user-supplied entry-point WSDL/schema URL is still loaded.\n\nAffected versions: >= 4.0.0, < 4.3.3.\n\nUpgrade to 4.3.3 (or later) and set forbid_external=True when loading documents from untrusted sources:\n\n```python\nfrom zeep import Client, Settings\n\nsettings = Settings(forbid_external=True)\nclient = Client(\"https://untrusted.example/service?wsdl\", settings=settings)\n```\n\n## Workarounds\n\nIf you cannot upgrade to 4.3.3:\n\n- Do not load untrusted WSDL/XSD documents, and avoid loading WSDLs whose import/include targets can be influenced by untrusted input.\n- Vendor the schema locally: pre-fetch and review the WSDL and all of its imported schemas, then load them from local files (e.g. file:// paths) so no remote fetching occurs at parse\n  time.\n- Restrict egress at the network layer: block outbound traffic from the host/process to internal ranges and metadata endpoints (e.g. 169.254.169.254, RFC1918 ranges) so SSRF attempts\n  cannot reach sensitive targets.\n- Use a restrictive custom Transport: subclass the zeep transport and reject/allow-list URLs in load() so disallowed hosts are never fetched.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "zeep"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.3.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mvantellingen/python-zeep/security/advisories/GHSA-4cc2-g9w2-fhf6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mvantellingen/python-zeep/commit/83eb07bc6c84d841329d4f88856fecdba86f753e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mvantellingen/python-zeep"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mvantellingen/python-zeep/releases/tag/4.3.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-19T22:10:26Z",
    "nvd_published_at" : null
  }
}