Django security releases issued: 6.1.4, 6.0.11, and 5.2.20
VulnPulse 解读
Django 6.1.4, 6.0.11 and 5.2.20 fix seven bugs, including a GeoDjango RasterField file-write flaw
On Dec 2 Django shipped security releases for three supported lines, fixing seven CVEs. The headline issue, CVE-2026-124827, lets a value given to GeoDjango's RasterField make the server create a file in a location the attacker picks, which can lead to code execution depending on the raster driver.
受影响对象
Django 6.1 before 6.1.4, 6.0 before 6.0.11, and 5.2 before 5.2.20. Django says unsupported lines such as 5.1, 5.0 and 4.2 were not checked and may also be affected. The RasterField issue mainly concerns GeoDjango apps on PostGIS that define a RasterField and expose it through the admin, a ModelForm, or a writable model serializer.
简单来说
Picture a counter that accepts map images and lets the sender decide both the file name and how the file is stored. If the sender can choose where the file lands, they may drop something into a place the application later loads.
原理
When a raster data definition (a dict, or a JSON string of one) is assigned to a GeoDjango RasterField, GDAL opens it and creates a file. If a user controls the definition's name and can pick a non-default driver, the file is written where the attacker chooses. RasterField's form field is a plain text input (CharField), so it was exposed by default wherever the field appeared in the admin or a ModelForm. Django rates it high; the CVE record gives CVSS 3.1 8.8, assuming a logged-in user with low privileges. After the fix, RasterField is left out of forms by default (editable=False), and a dict or JSON value that names a non-default driver raises GDALException; trusted values should be wrapped in GDALRaster. Django warns that untrusted input assigned to RasterField can still trigger server-side requests (SSRF). The same release fixes SQL injection in the range and in lookups (CVE-2026-132092), which needs an unusual query: aliases or key transforms with percent signs. Django rates it high, and the CVE record scores it CVSS 3.1 9.8.
攻击过程
- A logged-in user submits a raster definition as text through a form that includes a RasterField, such as the admin
- The definition sets the output name and asks for a non-default GDAL driver
- When Django assigns the value to the RasterField, GDAL builds the file as described, in the location the attacker chose
- Depending on that location and the driver, the application may later load the file, which can end in code execution
应对措施
- Teams running Django: move to 6.1.4, 6.0.11 or 5.2.20. If you are on an unsupported line, move to a supported one
- GeoDjango developers using RasterField: after updating, check whether you still expose the field in forms or serializers on purpose, and if so add input validation, because SSRF remains possible
- Code that really needs a non-default driver should wrap only trusted values in GDALRaster
- Sites using the cache middleware or cache_page: clear caches after upgrading, since the fix for CVE-2026-125673 does not invalidate entries that already exist
- Developers: after the fix, a range lookup must be given two values on its right side, no more, so review any code that hands it three or more
尚不清楚的内容
- No exploitation has been reported. As of Dec 2, CISA's SSVC entry in the CVE record lists exploitation of CVE-2026-124827 as none
- Reports differ on where the name "Django4Shell" comes from. The Hacker News credits the reporter, whom Django's announcement thanks as Mohammed Fathy, while SecurityWeek cites Orca Security and says proof-of-concept details are public. We found neither original write-up, and Django's announcement does not use the name
- SecurityWeek and The Hacker News describe this bug as an incomplete fix for October's CVE-2026-87890. Django's announcement and the CVE record do not say so, although the CVE record does say 87890 was itself an incomplete fix for August's CVE-2026-15307
- Scores differ: the CVE record filed by Django gives CVSS 3.1 8.8, while The Hacker News reports 9.0
- Django did not test unsupported lines such as 5.1, 5.0 and 4.2
- For the SQL injection (CVE-2026-132092), Django's high rating assumes the unusual query patterns it needs, while the 9.8 score in the CVE record does not reflect those conditions
出处
- Django security releases issued: 6.1.4, 6.0.11, and 5.2.20
- CVE record CVE-2026-124827
- CVE record CVE-2026-132092
- CVE record CVE-2026-87890
- CVE record CVE-2026-15307
- Django security archive
- SecurityWeek (2026-12-03)
- The Hacker News (2026-12-02)
- Security NEXT (2026-12-03)
本解读由 VulnPulse 根据原文和公开信息以自己的语言撰写。准确信息请以出处为准。 更新:
原始公告 (原文)
In accordance with our security release policy , the Django team is issuing releases for Django 6.1.4 , Django 6.0.11 , and Django 5.2.20 . These releases address the security issues detailed below. We encourage all users of Django to upgrade as soon as possible. CVE-2026-124827: Server-side file-write via RasterField assignment Assigning a raster data definition to django.contrib.gis.db.models.RasterField with a user-controlled name parameter and a non-default driver could cause GDAL to write a file to an attacker-controlled location. Depending on the raster driver, this could enable remote…
2026/12/02 22:00,Django Weblog 发布了“Django security releases issued: 6.1.4, 6.0.11, and 5.2.20”(类型:版本发布)。相关技术:Django、Python。CVE:CVE-2026-124827。