Medium, CVSS 5.3PyPIPublished
OpenWISP IPAM has broken object-level authorization: ExportSubnetView lets a member of one organization export another organization's subnet and all its IP addresses
GHSA-x287-5c68-36wp
- Affected
- PyPI openwisp-ipam <= 1.2.0.post1
- Fixed in
- 1.2.1· Vendor fix available
- Issue
- OpenWISP IPAM is multi-tenant: every Subnet belongs to an organization, and API access is scoped to the organizations a user belongs to. The CSV export endpoint, ExportSubnetView, omits the organization-membership check that its import sibling performs, and loads the subnet by primary key with no organization filter. An authenticated user who is a member of one organization can therefore export a subnet belonging to another organization — its name, CIDR, organization slug and every IP address in it — by issuing an export request for that subnet's id. Details ImportSubnetView.post() authorizes first, by calling assertorganizationpermissions(): ExportSubnetView.post() performs no such check. It is declared with IpAddressOrgMixin (whose organization scoping lives in getqueryset()), but its overridden post() never calls getqueryset() or assertorganizationpermissions() — it goes straight to exportcsv(): exportcsv() resolves the subnet by primary key with no organization filter and…
Recommended action: Upgrade to 1.2.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.