CVE-2026-78661 (GCVE-0-2026-78661)

Vulnerability from cvelistv5 – Published: 2026-10-27 21:38 – Updated: 2026-10-27 21:38
VLAI
Title
Avoid quadratic complexity when coalescing text nodes in html in golang.org/x/net
Summary
When coalescing adjacent text nodes in addText and fosterParent, appending to an existing TextNode's Data via string concatenation (n.Data += text) reallocated and copied the accumulated string on every token. Inputs containing many short text runs separated by ignored end tags (such as "a</x>") caused O(n^2) allocations and byte copies. Accumulate coalesced text in per-node byte slices during parsing and materialize Data strings once at the end of parse.
Severity
No CVSS data available.
CWE
  • CWE-407 - Inefficient Algorithmic Complexity
Assigner
Go CNA under the Google root
CNA scorecard E 42/100 over 76 records in the last 180 days details
Impacted products
Vendor Product Version CPE status
golang.org/x/net golang.org/x/net/html Affected: 0 , < 0.62.0 (semver)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "collectionURL": "https://pkg.go.dev",
          "defaultStatus": "unaffected",
          "packageName": "golang.org/x/net/html",
          "product": "golang.org/x/net/html",
          "programRoutines": [
            {
              "name": "parser.addText"
            },
            {
              "name": "parser.fosterParent"
            },
            {
              "name": "parser.parse"
            },
            {
              "name": "Parse"
            },
            {
              "name": "ParseFragment"
            },
            {
              "name": "ParseFragmentWithOptions"
            },
            {
              "name": "ParseWithOptions"
            }
          ],
          "vendor": "golang.org/x/net",
          "versions": [
            {
              "lessThan": "0.62.0",
              "status": "affected",
              "version": "0",
              "versionType": "semver"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "value": "Markus Magnuson"
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "When coalescing adjacent text nodes in addText and fosterParent, appending to an existing TextNode\u0027s Data via string concatenation (n.Data += text) reallocated and copied the accumulated string on every token. Inputs containing many short text runs separated by ignored end tags (such as \"a\u003c/x\u003e\") caused O(n^2) allocations and byte copies. Accumulate coalesced text in per-node byte slices during parsing and materialize Data strings once at the end of parse."
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "description": "CWE-407: Inefficient Algorithmic Complexity",
              "lang": "en"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-10-27T21:38:56.517Z",
        "orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
        "shortName": "Go"
      },
      "references": [
        {
          "url": "https://go.dev/cl/849365"
        },
        {
          "url": "https://go.dev/issue/82224"
        },
        {
          "url": "https://groups.google.com/g/golang-announce/c/sqrs2vTx_Xs"
        },
        {
          "url": "https://pkg.go.dev/vuln/GO-2026-6860"
        }
      ],
      "title": "Avoid quadratic complexity when coalescing text nodes in html in golang.org/x/net"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
    "assignerShortName": "Go",
    "cveId": "CVE-2026-78661",
    "datePublished": "2026-10-27T21:38:56.517Z",
    "dateReserved": "2026-08-24T23:36:15.738Z",
    "dateUpdated": "2026-10-27T21:38:56.517Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-78661",
      "date": "2026-11-01",
      "epss": "0.00185",
      "percentile": "0.08063"
    },
    "microsoft_vex": {
      "current_release_date": "2026-10-31T01:07:15.000Z",
      "cve": "CVE-2026-78661",
      "id": "msrc_CVE-2026-78661",
      "initial_release_date": "2026-10-31T01:07:15.000Z",
      "product_status:under_investigation": "24",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "Avoid quadratic complexity when coalescing text nodes in html in golang.org/x/net",
      "url": "https://msrc.microsoft.com/csaf/vex/2026/msrc_cve-2026-78661.json",
      "version": "1"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "collectionURL": "https://pkg.go.dev",
                "defaultStatus": "unaffected",
                "packageName": "golang.org/x/net/html",
                "product": "golang.org/x/net/html",
                "programRoutines": [
                  {
                    "name": "parser.addText"
                  },
                  {
                    "name": "parser.fosterParent"
                  },
                  {
                    "name": "parser.parse"
                  },
                  {
                    "name": "Parse"
                  },
                  {
                    "name": "ParseFragment"
                  },
                  {
                    "name": "ParseFragmentWithOptions"
                  },
                  {
                    "name": "ParseWithOptions"
                  }
                ],
                "vendor": "golang.org/x/net",
                "versions": [
                  {
                    "lessThan": "0.62.0",
                    "status": "affected",
                    "version": "0",
                    "versionType": "semver"
                  }
                ]
              }
            ],
            "source": "security@golang.org"
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "When coalescing adjacent text nodes in addText and fosterParent, appending to an existing TextNode\u0027s Data via string concatenation (n.Data += text) reallocated and copied the accumulated string on every token. Inputs containing many short text runs separated by ignored end tags (such as \"a\u003c/x\u003e\") caused O(n^2) allocations and byte copies. Accumulate coalesced text in per-node byte slices during parsing and materialize Data strings once at the end of parse."
          }
        ],
        "id": "CVE-2026-78661",
        "lastModified": "2026-10-28T15:24:56.033",
        "metrics": {},
        "published": "2026-10-27T22:18:05.930",
        "references": [
          {
            "source": "security@golang.org",
            "url": "https://go.dev/cl/849365"
          },
          {
            "source": "security@golang.org",
            "url": "https://go.dev/issue/82224"
          },
          {
            "source": "security@golang.org",
            "url": "https://groups.google.com/g/golang-announce/c/sqrs2vTx_Xs"
          },
          {
            "source": "security@golang.org",
            "url": "https://pkg.go.dev/vuln/GO-2026-6860"
          }
        ],
        "sourceIdentifier": "security@golang.org",
        "vulnStatus": "Deferred"
      }
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.