# CVE-2026-126064: Nokogiri: Possible Use-After-Free when setting an attribute value via \`Nokogiri::XML::Node\#\[\]=\` or \`\#lang=\`

- Priority: **Routine**
- Reason: Not severe (CVSS 2, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-11-10 · Modified: 2026-11-10
- Aliases: GHSA-3w22-6jfg-527w, CGA-5889-48xq-jcxh, CGA-83j8-4qg8-226q, CGA-hcxw-whfw-w4j6, DEBIAN-CVE-2026-126064, CGA-4953-g2q5-3w6q, CGA-8hv4-9hp5-q8wq, CGA-9cp7-973f-8w4j, CGA-p9x6-x44m-6637, CGA-pj2g-g3f7-pc87, CGA-24pc-mc8x-6w48, CGA-2hm6-598m-vxp5, CGA-2w9h-6g8p-6472, CGA-46c4-66wc-r52r, CGA-4mh8-vwgq-h5fx, CGA-578c-pcxj-wgmq, CGA-5q9j-jmjf-2xrp, CGA-6wpw-g924-x2pm, CGA-7g85-8374-c37f, CGA-7rp5-w2fp-455r, CGA-8f57-pg76-vqmr, CGA-99cc-fx5r-cj2c, CGA-cq2r-59g9-jpp4, CGA-fjv9-v8h3-fvm8, CGA-gfp7-r6j9-mggp, CGA-hvwm-gqc2-cxcf, CGA-mhx4-59h8-42ww, CGA-mm6v-2h3w-jc4c, CGA-pp7g-4rgm-mgpf, CGA-qh37-5qj2-c274, CGA-qjf4-5cf5-m8mh, CGA-qv56-65p3-99qq, CGA-vp9x-g685-2mjp, CGA-xqm5-x869-hggw, CGA-xw3c-86m4-9pr8, CGA-26v3-cw2f-rpwg, CGA-2c4q-w4wx-g432, CGA-2j84-x9c5-2h5c, CGA-3gpc-rvv3-h653, CGA-3mrq-84g2-6xmj, CGA-5mgv-xfvw-25v3, CGA-7j5g-538m-4xcp, CGA-ch83-r6vj-3r6w, CGA-cpfp-54mm-rjjg, CGA-cxmv-vcfq-32hw, CGA-f99w-phf4-22r3, CGA-frw6-4p86-jpgf, CGA-hwfv-2cj9-vqm4, CGA-qm7w-5qmq-44x2, CGA-qp2g-vh6v-2mqq, CGA-xw5m-h4h7-mjh7, CGA-xwgc-927h-q525, CGA-7ww6-5344-jr8g, CGA-x4q8-gcph-j5xh, CGA-5pvg-238p-mq33, CGA-g8cx-2cwq-v9v9, CGA-mmr7-mx47-5hw2, CGA-q36g-cmqw-j2fq, UBUNTU-CVE-2026-126064, CGA-6c96-j72r-9j6v, CGA-x6cq-jpc4-7hvc, CGA-5948-4pw8-vwj5, CGA-hgpj-37hv-q2rh, CGA-mp7x-g76p-pjmw, CGA-p9vm-59m5-24hq, CGA-73gp-5hg6-95px, CGA-c33r-8xfr-q2w8, CGA-m7wq-7292-jrc8, ALPINE-CVE-2026-126064
- Record: https://cvemate.com/vulnerability/CVE-2026-126064 · JSON: https://cvemate.com/vulnerability/CVE-2026-126064/json

## Description

```text
Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.5, the CRuby native extension can leave Ruby wrappers pointing to freed memory when Nokogiri::XML::Node#[]= or Nokogiri::XML::Node#lang= replaces an existing attribute value after code has accessed the attribute's child nodes. Replacing the value frees native child nodes while their wrappers remain reachable, and later use of those wrappers can cause an invalid read or process segfault. JRuby is not affected. This issue is fixed in version 1.19.5.
```

## Signals

- CVSS: 2 low (v4.0, CVE.org) CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
- EPSS: 0.155%, percentile 4.818%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 48)

- alpine ruby-nokogiri (Alpine Linux): \< 1.19.7-r0
- chainguard commercial-gitlab-rails-ee-19.1 (Chainguard): All versions (No fix recorded)
- chainguard commercial-gitlab-rails-ee-fips-19.1 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.10 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.8 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-18.9 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-19.0 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-19.2 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.10 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.11 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.8 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-18.9 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-19.0 (Chainguard): All versions (No fix recorded)
- chainguard gitlab-rails-ce-fips-19.2 (Chainguard): All versions (No fix recorded)
- chainguard logstash-8.19 (Chainguard): All versions (No fix recorded)
- chainguard logstash-8.19-iamguarded-compat (Chainguard): All versions (No fix recorded)
- chainguard logstash-8.19-with-output-opensearch (Chainguard): All versions (No fix recorded)
- chainguard logstash-9.3 (Chainguard): All versions (No fix recorded)
- chainguard logstash-9.3-iamguarded-compat (Chainguard): All versions (No fix recorded)
- chainguard logstash-9.4 (Chainguard): All versions (No fix recorded) \| \< 9.4.9-r1

## References

- <https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-3w22-6jfg-527w>
- <https://github.com/sparklemotion/nokogiri/pull/3752>
- <https://github.com/sparklemotion/nokogiri/commit/b15b518db9fd15fd6b046f73d1439c282e5cc425>
- <https://github.com/sparklemotion/nokogiri/commit/feaed3c8c9bd9d81d064d4ca09b16044cd705d6f>
- <https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5>
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/GHSA-3w22-6jfg-527w.yml>
- <https://github.com/sparklemotion/nokogiri>
- <https://security-tracker.debian.org/tracker/CVE-2026-126064>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/126xxx/CVE-2026-126064.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-126064>
- <https://ubuntu.com/security/CVE-2026-126064>
- <https://www.cve.org/CVERecord?id=CVE-2026-126064>
- <https://security.alpinelinux.org/vuln/CVE-2026-126064>

---

Data as of 2026-12-05T04:12:59.643Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
