Code review checklist for OGRGeometry.wkb after CVE-2026-132809
Review the dependency first
CVE-2026-132809 affects Django GeoDjango before 6.1.4, 6.0.11, and 5.2.20. Confirm the installed version before reviewing application logic.
The unsupported 5.1, 5.0, and 4.2 branches were not evaluated and need a migration plan rather than an assumption of safety.
The code review then answers a separate question: can the application create an OGRGeometry larger than 4GB and send it through wkb, hex, geos, or pickling?
Find all geometry construction points
Search for direct use of OGRGeometry, GDAL data sources, GeoJSON import helpers, and third-party packages that wrap them. Include:
- API serializers
- File import commands
- ETL jobs
- Admin tools
- Tests
Note where the geometry size is controlled by a user, tenant, external feed, or internal database record.
Trace each object to the code that stores or transmits it. A direct call to .wkb is easy to find. Indirect conversion through a serializer, cache, or message encoder is easier to miss.
Check size enforcement
Verify that a maximum size is applied before the geometry reaches the vulnerable property. Check the unit of the limit and whether compression or decoding changes the effective size.
Reject unsupported values with a stable error and avoid doing expensive conversions during validation.
Review memory settings for the process that performs conversion. Large memory allowances can be justified for legitimate processing, but they should not make an unbounded customer input reachable.
Inspect error handling
A failed geometry conversion should return a controlled error, log the object identifier and size class, and avoid exposing raw spatial data. The worker should not retry the same object indefinitely.
If the process can crash, the queue needs a poison-message policy and an alert. Check that a crash does not leave a partial record, duplicate import, or inconsistent transaction.
The security issue is the buffer overflow, but the recovery path determines whether a crash becomes a larger data problem.
Verify the fix
After upgrading, confirm that the fixed Django version is running. Exercise WKB, hex, GEOS, and pickle paths used by the application. Test the largest accepted object and a value above the service limit. Record the results with the release owner and input-limit owner.
Review conclusion
A service passes this review only when the dependency is fixed or has an approved migration plan, every relevant construction path has a size boundary, and crash recovery is bounded. A scanner alert without that code-level evidence is incomplete.
References
Official Django release CVE-2026-132809 Rapid7 details
Comments
No comments yet. Start the discussion.