Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2018-7537

An issue was discovered in Django 2.0 before 2.0.3, 1.11 before 1.11.11, and 1.8 before 1.8.19. If django.utils.text.Truncator's chars() and words() methods were passed the html=True argument, they were extremely slow to evaluate certain inputs due to a catastrophic backtracking vulnerability in a regular expression. The chars() and words() methods are used to implement the truncatechars_html and truncatewords_html template filters, which were thus vulnerable.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2018-7537
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 04:34 UTC · Revision 1

Source evidence

CVE-2018-7537

core-osv · Original source

Published 9 Mar 2018, 20:29 UTC

An issue was discovered in Django 2.0 before 2.0.3, 1.11 before 1.11.11, and 1.8 before 1.8.19. If django.utils.text.Truncator's chars() and words() methods were passed the html=True argument, they were extremely slow to evaluate certain inputs due to a catastrophic backtracking vulnerability in a regular expression. The chars() and words() methods are used to implement the truncatechars_html and truncatewords_html template filters, which were thus vulnerable.

osv:CVE-2018-7537
Complete source record
{
  "id": "d1ca639bbab9cb53cb53589a0ce9dd7e7d2517ee4b743dc8dda6db7e2e13d71c",
  "url": "https://osv.dev/vulnerability/CVE-2018-7537",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2018-7537",
    "summary": "An issue was discovered in Django 2.0 before 2.0.3, 1.11 before 1.11.11, and 1.8 before 1.8.19. If django.utils.text.Truncator's chars() and words() methods were passed the html=True argument, they were extremely slow to evaluate certain inputs due to a catastrophic backtracking vulnerability in a regular expression. The chars() and words() methods are used to implement the truncatechars_html and truncatewords_html template filters, which were thus vulnerable.",
    "evidence": "osv:CVE-2018-7537",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2018-7537",
      "aliases": [
        "CVE-2018-7537",
        "GHSA-2f9x-5v75-3qv4",
        "PYSEC-2018-6"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/django/django",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6a0dc2176f4ebf907e124d433411e52bba39a28e"
                },
                {
                  "fixed": "c686dd8e6bb3817bcf04b8f13c025b4d3c3dc6dc"
                },
                {
                  "introduced": "c669cf279ae7b3e02a61db4fb077030a4db80e4f"
                },
                {
                  "fixed": "1cc5aceac0a73468a6d1a671b9c86423e5bcf011"
                },
                {
                  "introduced": "8c85c8692240e5ae4b568eb4272475fe1fa4b059"
                },
                {
                  "fixed": "2d73ffc6f96e399716a1ed3f58acd4e99afa3d33"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "1.8"
                      },
                      {
                        "fixed": "1.8.19"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "1.11"
                      },
                      {
                        "fixed": "1.11.11"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.0"
                      },
                      {
                        "fixed": "2.0.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2018-7537.json"
          }
        }
      ],
      "modified": "2026-10-24T10:30:20.137795772Z",
      "provider": "osv",
      "references": [
        "https://access.redhat.com/errata/RHSA-2018:2927",
        "https://access.redhat.com/errata/RHSA-2019:0265",
        "https://lists.debian.org/debian-lts-announce/2018/03/msg00006.html",
        "https://usn.ubuntu.com/3591-1/",
        "https://www.debian.org/security/2018/dsa-4161",
        "https://www.djangoproject.com/weblog/2018/mar/06/security-releases/"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*",
              "cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*",
              "cpe:2.3:o:canonical:ubuntu_linux:17.10:*:*:*:*:*:*:*"
            ],
            "vendor_product": "canonical:ubuntu_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "14.04"
                  },
                  {
                    "last_affected": "14.04"
                  },
                  {
                    "introduced": "16.04"
                  },
                  {
                    "last_affected": "16.04"
                  },
                  {
                    "introduced": "17.10"
                  },
                  {
                    "last_affected": "17.10"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*",
              "cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*",
              "cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "debian:debian_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "7.0"
                  },
                  {
                    "last_affected": "7.0"
                  },
                  {
                    "introduced": "8.0"
                  },
                  {
                    "last_affected": "8.0"
                  },
                  {
                    "introduced": "9.0"
                  },
                  {
                    "last_affected": "9.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2018-7537",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 430197,
  "published_at": "2018-03-09T20:29:00.66+00:00"
}