# CVE-2026-78661: Avoid quadratic complexity when coalescing text nodes in html in golang.org/x/net


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 27 Oct 2026
- **Updated:** 27 Oct 2026
- **Also known as:** CLEANSTART-2026-FA45918, DEBIAN-CVE-2026-78661, ECHO-3093-63b1-15db, GHSA-75pg-wvh3-34jr, GO-2026-6860, MINI-25v9-vp4m-j6h8, MINI-28x6-w8mw-fgcv, MINI-2fvf-57cf-25pf, MINI-2gjm-59cw-v97q, MINI-2mpj-964v-qp43, MINI-2rhr-mjv3-wvh4, MINI-2vqh-mh4w-mf2m, MINI-2x2m-fmrx-qmh9, MINI-2xj2-rwpq-5q5v, MINI-32cg-37j6-65c7, MINI-358x-232j-q42w, MINI-35v2-c44p-3hhm, MINI-368p-5q6x-5qvx, MINI-385v-4m6w-gp7g, MINI-38j8-r9xg-9hcq, MINI-3c3v-8v6r-mwwf, MINI-3cwf-68x6-9fv3, MINI-3j2g-2hqx-f8fh, MINI-3jc9-x564-4x2r, MINI-3qwv-j592-2827, MINI-4g49-j539-9vf4, MINI-4jr2-5w3q-qg85, MINI-4w2q-jg63-wwv6, MINI-4xc9-2x9v-p4wp, MINI-56j6-cfr4-wvm3, MINI-5jvq-c5cf-jfg2, MINI-5qp3-hv3r-wrh4, MINI-62c7-742h-c94p, MINI-66c7-52gr-jr2j, MINI-68c7-q9c5-3fj9, MINI-6qjr-c5c6-67m3, MINI-6w79-vqv3-8h24, MINI-73f9-2j36-7cr6, MINI-78rg-p826-cgmh, MINI-82g7-4jhj-jmh8, MINI-85g9-cq6m-2745, MINI-85jm-fjr6-c98v, MINI-87cw-qc3r-c34p, MINI-88q5-f24m-r587, MINI-8c86-rpp7-2x98, MINI-8g9x-pj99-vr37, MINI-8m4h-xc44-hhg9, MINI-8mrm-m9m3-q5qq, MINI-8rcc-p389-3gmf, MINI-93cx-j843-g6f7, MINI-94w9-4vw2-c488, MINI-99ff-qhmf-fhq9, MINI-9gq7-x6v2-2jvq, MINI-9pgx-p5m3-gjf3, MINI-9pm4-h5h7-74q6, MINI-9r9w-mf62-c3c3, MINI-9ww4-8hf4-44rc, MINI-chp8-wc6w-7jcc, MINI-cr98-c325-gwrh, MINI-cwrp-4v2m-6895, MINI-cxmj-9pjx-c67c, MINI-f3qc-326q-w7j2, MINI-fx53-83pp-86wg, MINI-g4gh-hhhm-pjqm, MINI-ggm3-wxw3-g3q3, MINI-gj7r-fwhr-pfxw, MINI-gv3c-7574-crpj, MINI-h45h-5qh5-g8x6, MINI-h5gj-7px4-h849, MINI-h6qc-47v4-jjw7, MINI-hjm8-c7cf-qhxq, MINI-j278-wpwj-3cj3, MINI-j9j9-rpv3-wq9h, MINI-m7m8-7535-9787, MINI-m7rh-5rp8-8r3v, MINI-mfj9-j8q3-8cjv, MINI-mh3w-5545-c8c3, MINI-mxqg-w2wp-q83j, MINI-mxvm-wh2w-qhpp, MINI-p6q8-qhx8-wvhf, MINI-p76c-f2jp-6gx8, MINI-p9q4-q6q2-h374, MINI-pfrg-f65x-39rh, MINI-phr8-cg2w-pr3c, MINI-pr4w-6rc9-89xp, MINI-pxm9-wp7v-wrx6, MINI-qf2p-68xg-4m37, MINI-qqhx-4wvx-jwc3, MINI-qrx6-vx5c-6rvr, MINI-qwjv-r9w4-g3q5, MINI-rfqw-37xm-rgvm, MINI-rjcm-6r96-7fh8, MINI-rr83-hqxr-7p7v, MINI-rrjj-w2gj-h773, MINI-v2w2-cphf-54qm, MINI-v4gp-9xq6-fw58, MINI-v58m-9qvf-5g68, MINI-v58v-w4rx-v3fx, MINI-v68q-26pf-5v8f, MINI-v77c-q8m6-h3p8, MINI-vpjc-vfvg-9jj2, MINI-vqm7-q4jw-x69h, MINI-vwq6-4822-5cm7, MINI-w22h-4cjj-v6f3, MINI-w7m2-q8r8-fhh5, MINI-w9h4-9jxw-j835, MINI-wf2g-3vh8-xjmh, MINI-wvh6-9mx2-pjv4, MINI-wxv2-rgxx-4xj3, MINI-x3x3-w8c2-4pvw, MINI-x3x4-qcwp-rp4m, MINI-x5cm-f3c7-4hv8, MINI-xch5-2cxp-h9r5, MINI-xgqm-vx4q-h22h, MINI-xhf4-5h8j-j6cq, MINI-xqhg-6jc9-2h3v, MINI-xqxv-9wg7-3mr5, MINI-xxwf-x5x8-c3jg, UBUNTU-CVE-2026-78661

## What is CVE-2026-78661?

CVE-2026-78661 is a vulnerability in golang.org/x/net/html, published on 27 Oct 2026. 

### Official description

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.

## Which versions are affected by CVE-2026-78661?

1 open source package ship an affected version, including golang.org/x/net.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `golang.org/x/net` | Go | All versions | 0.62.0 |

## How do I fix CVE-2026-78661?

Upgrade golang.org/x/net to 0.62.0 or later.

## Is CVE-2026-78661 being exploited?

There is no known exploitation of CVE-2026-78661 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-78661 and fix it if it is affected.

What it is: CVE-2026-78661 is a vulnerability in golang.org/x/net/html, published on 27 Oct 2026. 
Exploitation: There is no known exploitation of CVE-2026-78661 in the wild and no public exploit code.

Affected packages and fixed versions:
- golang.org/x/net (Go): affected all versions; fixed in 0.62.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-78661/ (Markdown: https://insights.sbomify.com/CVE-2026-78661/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-78661
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-78661
- OSV: https://osv.dev/vulnerability/CVE-2026-78661

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-78661/
Summaries are generated and may contain mistakes; the official description above is the record.
