Cabeçalho penumbroso

CVE-2026-124827: Check GeoDjango RasterField Exposure and Fixes

CVE-2026-124827 affects a specific GeoDjango write path: assigning an untrusted raster data definition to RasterField. Django released fixes on December 2, 2026, in 6.1.4, 6.0.11, and 5.2.20. Start by identifying which application inputs can reach that field; a Django package inventory alone cannot establish whether your deployment exposes the vulnerable operation. The official security announcement identifies the releases and links the fixes.

This is a server-side file-write issue with possible remote code execution, depending on the raster driver. It does not mean every Django application exposes an RCE endpoint. Django’s release notes identify RasterField, which is implemented only on PostGIS, and explicitly exclude geometry fields. The exposure questions below turn that scope into a review you can document without sending an exploit to a running service.

Trace the input before assigning severity to your deployment

A raster data definition describes how GDAL should construct a raster. The vulnerable combination involves a user-controlled nome, which can select an output location, and a non-default driver, which can cause a file to be written. What that file can do depends on the driver and deployment. The Django 6.1.4 release notes describe this mechanism and the conditional code-execution impact.

The relevant boundary is therefore where an application accepts a data definition as untrusted input and assigns it to RasterField. Review who can submit that input, how the application validates it, and what the worker process can access. An administrative interface is still an input boundary: a staff user’s ability to edit an application record should not automatically imply permission to choose files on the server.

Use this matrix to keep absence of evidence separate from a documented exposure decision:

Review questionEvidence to collectDecision
Does this service use RasterField?Model definitions and installed application codeIf absent, this particular field-assignment path is absent; continue the normal security update process.
Can a requester write the field?Admin registration, forms, serializers, views, import jobsIdentify the exact write path and its allowed users. A model definition alone does not prove reachability.
Can untrusted values control a data definition?Validation and assignment code, including dictionary and JSON handlingTreat unchecked assignment as a remediation task. Do not infer safety from the field name or UI widget.
Is the running service patched?Runtime package version or documented vendor backport, deployment artifact, restarted workersA lockfile change without deployment evidence leaves the operational question open.
Can other untrusted raster inputs still cause requests?Accepted input types, validation, network policyKeep this as a separate SSRF review after the file-write fix.
Four-stage exposure review checks PostGIS RasterField, untrusted assignment, output name and driver control, and route and runtime permissions.

Check admin, forms, serializers, and custom assignments

Django explains that the field’s fallback to CharField made the issue reachable by default when a model containing RasterField was registered in admin or used through a ModelForm or writable model serializer. Do not limit the review to a public upload screen. Include internal record editors, bulk imports, and background jobs that consume data originally supplied by a user.

The following commands search a local source checkout. They do not contact a target, instantiate a raster, or establish exploitability:

python -m django --version
rg -n --glob '*.py' 'RasterField|GDALRaster' .
rg -n --glob '*.py' 'ModelForm|ModelSerializer|admin.site.register|@admin.register' .

Run the version command inside the same environment or container used by the service. Search results are review leads, not a complete call graph. Aliased imports, generated models, dependencies, and assignments hidden behind helper functions can require manual inspection.

For each discovered field, follow writes from request parsing through validation to assignment. Record whether forms include it explicitly, whether a serializer exposes it as writable, and whether a custom endpoint bypasses those abstractions. Check the actual permission attached to that operation rather than calling the issue unauthenticated by assumption. Keep sensitive configuration and request data out of a public issue tracker when recording this evidence.

Upgrade the maintained branch and verify the deployed result

The December 2 security release supplies these upstream fixes:

Maintained branchFixed releasePrimary release record
Django 6.16.1.46.1.4 release notes
Django 6.06.0.116.0.11 release notes
Django 5.25.2.20December 2 announcement

These are branch-specific fixes, not interchangeable upgrade targets. Django’s security release archive warns that older unsupported and prerelease branches may also have been affected. An older branch’s absence from the supported release list is not evidence that it is safe. Use a supported upgrade path or obtain a documented fix from your distributor.

After deployment, capture the version from a fresh service process and verify that all relevant worker groups were replaced. If a vendor backports the fix without changing the upstream-looking version, retain the vendor advisory and package revision as evidence. Recheck the write paths found earlier so a dormant administrative feature does not escape the review simply because the main web route was tested.

Understand the two changes in the fix

The patch changes both form exposure and assignment handling. RasterField now defaults to editable=False, which excludes it from a ModelForm unless explicitly included. Assignment of a dictionary or JSON string specifying a non-default driver now raises GDALException. Django documents wrapping a definition in GDALRaster when a trusted value deliberately needs another driver. These behaviors are described in the 6.0.11 release notes.

Treat these as separate review points. Confirm that application code does not accidentally re-enable a field you intended to keep out of editing interfaces. Then examine programmatic writes, which may never pass through a ModelForm. A convenience wrapper that converts every incoming value into GDALRaster would undermine the intended trust distinction; establish trust through validation before constructing that object.

In a disposable test environment, extend application tests to assert that untrusted callers cannot write restricted raster fields and that custom forms and serializers enforce the intended policy. Exercise ordinary valid data as well, because a security deployment that breaks a legitimate import workflow may tempt operators to restore an unsafe bypass. This article does not report a Penligent exploit reproduction or a tested payload.

Django patch behavior is compared with application validation, network restrictions, and runtime permissions needed for residual raster-input risk.

Keep SSRF as a separate item after patching

Django explicitly states that the new exception limits server-side file writes and that SSRF remains possible when untrusted input is assigned to RasterField. Closing CVE-2026-124827 therefore requires a narrow conclusion: the documented file-write fix is deployed and your application handles raster input according to its trust model. It does not justify closing every network-access concern related to raster processing.

Review which external locations, if any, a legitimate workflow needs to access. Prefer application-controlled resource selection over accepting arbitrary locations from a requester. Validate the accepted representation and apply network restrictions suited to the worker’s actual job. These are defensive design recommendations; they are not claims that a particular configuration has been tested against every GDAL input path.

When using Penligente to organize an authorized validation workflow, attach the deployment evidence and the field-access decision to the finding. Keep the patch check, authorization check, and residual SSRF review as distinct outcomes so a successful package upgrade does not conceal an unfinished application review.

The following Penligent 3.0 video demonstrates a general product workflow. It is not evidence of exploitation or remediation of this CVE.

Evidence to retain when closing the finding

Keep the running package or vendor-backport record, the list of affected models, the reviewed writable interfaces, and the application validation decision. Record which service processes received the deployment and the separate status of the residual SSRF review. If any input path remains unknown, state that limit rather than marking the deployment unexposed.

This assessment is based on Django’s published December 2 release material and a defensive synthesis of the checks it implies. It does not establish in-the-wild exploitation, successful code execution in your environment, or the safety of an unreviewed custom raster workflow.

Compartilhe a postagem:
Publicações relacionadas
pt_BRPortuguese