VYPR
High severityNVD Advisory· Published Jul 31, 2012· Updated Apr 29, 2026

CVE-2012-3443

CVE-2012-3443

Description

The django.forms.ImageField class in the form system in Django before 1.3.2 and 1.4.x before 1.4.1 completely decompresses image data during image validation, which allows remote attackers to cause a denial of service (memory consumption) by uploading an image file.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
DjangoPyPI
< 1.3.21.3.2
DjangoPyPI
>= 1.4, < 1.4.11.4.1

Affected products

29
  • cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*+ 28 more
    • cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*range: <=1.3
    • cpe:2.3:a:djangoproject:django:0.95:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:0.96:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.0:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.0.1:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.0.2:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.0:alpha1:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.0:alpha2:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.0:beta:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.0:beta2:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.1:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.1.2:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.1.3:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.1.4:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.1:alpha1:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.1:beta1:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.1:rc1:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.2:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.2.2:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.2.4:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.2.5:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.2.6:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.2.7:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.2-alpha1:*:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.2:beta1:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.2:rc1:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.3:alpha1:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.3:beta1:*:*:*:*:*:*
    • cpe:2.3:a:djangoproject:django:1.4:*:*:*:*:*:*:*

Patches

2
da33d67181b5

[1.4.x] Fixed a security issue in image uploading. Disclosure and release forthcoming.

https://github.com/django/djangoFlorian ApollonerJul 30, 2012via ghsa
1 file changed · +6 1
  • django/core/files/images.py+6 1 modified
    @@ -47,13 +47,18 @@ def get_image_dimensions(file_or_path, close=False):
             file = open(file_or_path, 'rb')
             close = True
         try:
    +        # Most of the time PIL only needs a small chunk to parse the image and
    +        # get the dimensions, but with some TIFF files PIL needs to parse the
    +        # whole file.
    +        chunk_size = 1024
             while 1:
    -            data = file.read(1024)
    +            data = file.read(chunk_size)
                 if not data:
                     break
                 p.feed(data)
                 if p.image:
                     return p.image.size
    +            chunk_size = chunk_size*2
             return None
         finally:
             if close:
    
9ca0ff6268ee

[1.3.x] Fixed a security issue in image uploading. Disclosure and release forthcoming.

https://github.com/django/djangoFlorian ApollonerJul 30, 2012via ghsa
1 file changed · +6 1
  • django/core/files/images.py+6 1 modified
    @@ -47,13 +47,18 @@ def get_image_dimensions(file_or_path, close=False):
             file = open(file_or_path, 'rb')
             close = True
         try:
    +        # Most of the time PIL only needs a small chunk to parse the image and
    +        # get the dimensions, but with some TIFF files PIL needs to parse the
    +        # whole file.
    +        chunk_size = 1024
             while 1:
    -            data = file.read(1024)
    +            data = file.read(chunk_size)
                 if not data:
                     break
                 p.feed(data)
                 if p.image:
                     return p.image.size
    +            chunk_size = chunk_size*2
             return None
         finally:
             if close:
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

17

News mentions

0

No linked articles in our index yet.