Search

Find a vulnerability

Search criteria

    Related vulnerabilities

    BREW-LICENSEE-CVE-2026-126064 (GHSA-3W22-6JFG-527W)

    Vulnerability from osv_homebrew – Published: 2026-11-11 10:50 – Updated: 2026-11-11 10:50 – Source website
    VLAI
    Summary
    Nokogiri: Use-After-Free in Nokogiri when replacing an attribute value
    Details

    Summary

    Nokogiri's CRuby native extension could leave a Ruby wrapper pointing to freed memory when replacing the value of an existing XML attribute via Nokogiri::XML::Node#[]= or Nokogiri::XML::Node#lang=. If Ruby code had already accessed the attribute's child nodes, replacing the value could free those native child nodes while their wrappers remained reachable. Using one of those child nodes afterwards could cause an invalid read and a possible segfault.

    This is the same class of issue as GHSA-phwj-rprq-35pp, which was fixed for Attr#value= in Nokogiri 1.19.4.

    Nokogiri 1.19.5 preserves all already-wrapped attribute child nodes before replacing the attribute value.

    JRuby is not affected.

    Severity

    The Nokogiri maintainers have evaluated this as low severity. Reaching it requires an unusual API-usage pattern that does not arise during normal use. The application must directly access an attribute's child nodes and then replace that same attribute's value via Node#[]= or Node#lang=. Nokogiri 1.19.5 makes this pattern safe with no change to the public API.

    Mitigation

    Upgrade to Nokogiri 1.19.5 or later.

    As a workaround, avoid accessing attribute child nodes directly via Attr#children or similar before replacing the same attribute's value.

    Credit

    This issue was responsibly reported by zx (@manus-pi).


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": null,
            "range_state": "affected",
            "resource": "nokogiri",
            "resource_purl": "pkg:gem/nokogiri@1.19.4",
            "upstream_fixed_in": "1.19.5"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "licensee",
            "purl": "pkg:brew/licensee"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "10.1.0"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "RubyGems",
            "key": "pkg:gem/nokogiri@1.19.4",
            "name": "nokogiri",
            "resource": "nokogiri",
            "strategy": "registry",
            "subject_version": "1.19.4"
          }
        ]
      },
      "details": "### Summary\n\nNokogiri\u0027s CRuby native extension could leave a Ruby wrapper pointing to freed memory when replacing the value of an existing XML attribute via `Nokogiri::XML::Node#[]=` or `Nokogiri::XML::Node#lang=`. If Ruby code had already accessed the attribute\u0027s child nodes, replacing the value could free those native child nodes while their wrappers remained reachable. Using one of those child nodes afterwards could cause an invalid read and a possible segfault.\n\nThis is the same class of issue as [GHSA-phwj-rprq-35pp](https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-phwj-rprq-35pp), which was fixed for `Attr#value=` in Nokogiri 1.19.4.\n\nNokogiri 1.19.5 preserves all already-wrapped attribute child nodes before replacing the attribute value.\n\nJRuby is not affected.\n\n### Severity\n\nThe Nokogiri maintainers have evaluated this as low severity. Reaching it requires an unusual API-usage pattern that does not arise during normal use. The application must directly access an attribute\u0027s child nodes and then replace that same attribute\u0027s value via `Node#[]=` or `Node#lang=`. Nokogiri 1.19.5 makes this pattern safe with no change to the public API.\n\n### Mitigation\n\nUpgrade to Nokogiri 1.19.5 or later.\n\nAs a workaround, avoid accessing attribute child nodes directly via `Attr#children` or similar before replacing the same attribute\u0027s value.\n\n### Credit\n\nThis issue was responsibly reported by zx (@manus-pi).",
      "id": "BREW-licensee-CVE-2026-126064",
      "modified": "2026-11-11T10:50:56Z",
      "published": "2026-11-11T10:50:56Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-3w22-6jfg-527w"
        },
        {
          "type": "WEB",
          "url": "https://github.com/sparklemotion/nokogiri/pull/3752"
        },
        {
          "type": "WEB",
          "url": "https://github.com/sparklemotion/nokogiri/commit/b15b518db9fd15fd6b046f73d1439c282e5cc425"
        },
        {
          "type": "WEB",
          "url": "https://github.com/sparklemotion/nokogiri/commit/feaed3c8c9bd9d81d064d4ca09b16044cd705d6f"
        },
        {
          "type": "WEB",
          "url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/GHSA-3w22-6jfg-527w.yml"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/sparklemotion/nokogiri"
        },
        {
          "type": "WEB",
          "url": "https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "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",
          "type": "CVSS_V4"
        }
      ],
      "summary": "Nokogiri: Use-After-Free in Nokogiri when replacing an attribute value",
      "upstream": [
        "GHSA-3w22-6jfg-527w",
        "CVE-2026-126064"
      ]
    }

    BREW-MIKUTTER-CVE-2026-126064 (GHSA-3W22-6JFG-527W)

    Vulnerability from osv_homebrew – Published: 2026-11-11 09:13 – Updated: 2026-11-11 09:13 – Source website
    VLAI
    Summary
    Nokogiri: Use-After-Free in Nokogiri when replacing an attribute value
    Details

    Summary

    Nokogiri's CRuby native extension could leave a Ruby wrapper pointing to freed memory when replacing the value of an existing XML attribute via Nokogiri::XML::Node#[]= or Nokogiri::XML::Node#lang=. If Ruby code had already accessed the attribute's child nodes, replacing the value could free those native child nodes while their wrappers remained reachable. Using one of those child nodes afterwards could cause an invalid read and a possible segfault.

    This is the same class of issue as GHSA-phwj-rprq-35pp, which was fixed for Attr#value= in Nokogiri 1.19.4.

    Nokogiri 1.19.5 preserves all already-wrapped attribute child nodes before replacing the attribute value.

    JRuby is not affected.

    Severity

    The Nokogiri maintainers have evaluated this as low severity. Reaching it requires an unusual API-usage pattern that does not arise during normal use. The application must directly access an attribute's child nodes and then replace that same attribute's value via Node#[]= or Node#lang=. Nokogiri 1.19.5 makes this pattern safe with no change to the public API.

    Mitigation

    Upgrade to Nokogiri 1.19.5 or later.

    As a workaround, avoid accessing attribute child nodes directly via Attr#children or similar before replacing the same attribute's value.

    Credit

    This issue was responsibly reported by zx (@manus-pi).


    {
      "affected": [
        {
          "ecosystem_specific": {
            "fix": null,
            "range_state": "affected",
            "resource": "nokogiri",
            "resource_purl": "pkg:gem/nokogiri@1.16.3",
            "upstream_fixed_in": "1.19.5"
          },
          "package": {
            "ecosystem": "Homebrew",
            "name": "mikutter",
            "purl": "pkg:brew/mikutter"
          },
          "ranges": [
            {
              "events": [
                {
                  "introduced": "3.4.6"
                }
              ],
              "type": "ECOSYSTEM"
            }
          ]
        }
      ],
      "database_specific": {
        "confidence": "high",
        "source": "matched",
        "strategy": "registry",
        "upstream_evidence": [
          {
            "ecosystem": "RubyGems",
            "key": "pkg:gem/nokogiri@1.16.3",
            "name": "nokogiri",
            "resource": "nokogiri",
            "strategy": "registry",
            "subject_version": "1.16.3"
          }
        ]
      },
      "details": "### Summary\n\nNokogiri\u0027s CRuby native extension could leave a Ruby wrapper pointing to freed memory when replacing the value of an existing XML attribute via `Nokogiri::XML::Node#[]=` or `Nokogiri::XML::Node#lang=`. If Ruby code had already accessed the attribute\u0027s child nodes, replacing the value could free those native child nodes while their wrappers remained reachable. Using one of those child nodes afterwards could cause an invalid read and a possible segfault.\n\nThis is the same class of issue as [GHSA-phwj-rprq-35pp](https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-phwj-rprq-35pp), which was fixed for `Attr#value=` in Nokogiri 1.19.4.\n\nNokogiri 1.19.5 preserves all already-wrapped attribute child nodes before replacing the attribute value.\n\nJRuby is not affected.\n\n### Severity\n\nThe Nokogiri maintainers have evaluated this as low severity. Reaching it requires an unusual API-usage pattern that does not arise during normal use. The application must directly access an attribute\u0027s child nodes and then replace that same attribute\u0027s value via `Node#[]=` or `Node#lang=`. Nokogiri 1.19.5 makes this pattern safe with no change to the public API.\n\n### Mitigation\n\nUpgrade to Nokogiri 1.19.5 or later.\n\nAs a workaround, avoid accessing attribute child nodes directly via `Attr#children` or similar before replacing the same attribute\u0027s value.\n\n### Credit\n\nThis issue was responsibly reported by zx (@manus-pi).",
      "id": "BREW-mikutter-CVE-2026-126064",
      "modified": "2026-11-11T09:13:48Z",
      "published": "2026-11-11T09:13:48Z",
      "references": [
        {
          "type": "WEB",
          "url": "https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-3w22-6jfg-527w"
        },
        {
          "type": "WEB",
          "url": "https://github.com/sparklemotion/nokogiri/pull/3752"
        },
        {
          "type": "WEB",
          "url": "https://github.com/sparklemotion/nokogiri/commit/b15b518db9fd15fd6b046f73d1439c282e5cc425"
        },
        {
          "type": "WEB",
          "url": "https://github.com/sparklemotion/nokogiri/commit/feaed3c8c9bd9d81d064d4ca09b16044cd705d6f"
        },
        {
          "type": "WEB",
          "url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/nokogiri/GHSA-3w22-6jfg-527w.yml"
        },
        {
          "type": "PACKAGE",
          "url": "https://github.com/sparklemotion/nokogiri"
        },
        {
          "type": "WEB",
          "url": "https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5"
        }
      ],
      "schema_version": "1.7.3",
      "severity": [
        {
          "score": "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",
          "type": "CVSS_V4"
        }
      ],
      "summary": "Nokogiri: Use-After-Free in Nokogiri when replacing an attribute value",
      "upstream": [
        "GHSA-3w22-6jfg-527w",
        "CVE-2026-126064"
      ]
    }

    CVE-2026-126064 (GCVE-0-2026-126064)

    Vulnerability from cvelistv5 – Published: 2026-11-10 20:17 – Updated: 2026-11-10 20:57
    VLAI
    Title
    Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Node#[]=` or `#lang=`
    Summary
    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.
    SSVC
    Exploitation: none Automatable: no Technical Impact: partial
    CISA Coordinator · CISA-ADP (v2.0.3)
    Decision recorded 2026-11-10 20:57 UTC
    CWE
    Assigner
    GitHub_M CNA
    Impacted products
    Vendor Product Version
    sparklemotion nokogiri Affected: < 1.19.5
    Create a notification for this product.
    Show details on NVD website

    {
      "containers": {
        "adp": [
          {
            "metrics": [
              {
                "other": {
                  "content": {
                    "id": "CVE-2026-126064",
                    "options": [
                      {
                        "Exploitation": "none"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2026-11-10T20:57:22.881835Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2026-11-10T20:57:32.805Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "product": "nokogiri",
              "vendor": "sparklemotion",
              "versions": [
                {
                  "status": "affected",
                  "version": "\u003c 1.19.5"
                }
              ]
            }
          ],
          "descriptions": [
            {
              "lang": "en",
              "value": "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\u0027s 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."
            }
          ],
          "metrics": [
            {
              "cvssV4_0": {
                "attackComplexity": "HIGH",
                "attackRequirements": "PRESENT",
                "attackVector": "LOCAL",
                "baseScore": 2,
                "baseSeverity": "LOW",
                "privilegesRequired": "LOW",
                "subAvailabilityImpact": "NONE",
                "subConfidentialityImpact": "NONE",
                "subIntegrityImpact": "NONE",
                "userInteraction": "NONE",
                "vectorString": "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",
                "version": "4.0",
                "vulnAvailabilityImpact": "LOW",
                "vulnConfidentialityImpact": "NONE",
                "vulnIntegrityImpact": "NONE"
              }
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-416",
                  "description": "CWE-416: Use After Free",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2026-11-10T20:17:13.658Z",
            "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
            "shortName": "GitHub_M"
          },
          "references": [
            {
              "name": "https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-3w22-6jfg-527w",
              "tags": [
                "x_refsource_CONFIRM"
              ],
              "url": "https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-3w22-6jfg-527w"
            },
            {
              "name": "https://github.com/sparklemotion/nokogiri/pull/3752",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/sparklemotion/nokogiri/pull/3752"
            },
            {
              "name": "https://github.com/sparklemotion/nokogiri/commit/b15b518db9fd15fd6b046f73d1439c282e5cc425",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/sparklemotion/nokogiri/commit/b15b518db9fd15fd6b046f73d1439c282e5cc425"
            },
            {
              "name": "https://github.com/sparklemotion/nokogiri/commit/feaed3c8c9bd9d81d064d4ca09b16044cd705d6f",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/sparklemotion/nokogiri/commit/feaed3c8c9bd9d81d064d4ca09b16044cd705d6f"
            },
            {
              "name": "https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5",
              "tags": [
                "x_refsource_MISC"
              ],
              "url": "https://github.com/sparklemotion/nokogiri/releases/tag/v1.19.5"
            }
          ],
          "source": {
            "advisory": "GHSA-3w22-6jfg-527w",
            "discovery": "UNKNOWN"
          },
          "title": "Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Node#[]=` or `#lang=`"
        }
      },
      "cveMetadata": {
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "assignerShortName": "GitHub_M",
        "cveId": "CVE-2026-126064",
        "datePublished": "2026-11-10T20:17:13.658Z",
        "dateReserved": "2026-11-10T17:07:43.283Z",
        "dateUpdated": "2026-11-10T20:57:32.805Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }