Skip to content
Heist/ feed
Back to feed
High

ruby-nokogiri — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2026-57236

Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, calling Document#encoding= with an invalid encoding (e.g., a non-string, or a string containing a null byte) raises an exception, but only after freeing the document's current encoding string without replacing it. The document is left referencing freed memory, so the next call to Document#encoding reads invalid memory, which can cause a segfault or leak freed bytes into a Ruby String. Affects the CRuby (libxml2) implementation only; JRuby is not affected. This vulnerability is fixed in 1.19.4.

Products
ruby-nokogiri
Affected versions
1.10.3+dfsg1-2, 1.10.4+dfsg1-1, 1.10.7+dfsg1-1, 1.10.7+dfsg1-2, 1.10.7+dfsg1-2build1, 1.10.7+dfsg1-2ubuntu0.1~esm2, 1.11.1+dfsg-2ubuntu1, 1.11.7+dfsg-3, 1.11.7+dfsg-3build1, 1.13.1+dfsg-2, 1.13.1+dfsg-2ubuntu0.1~esm1, 1.14.3+dfsg-2, 1.16.2+dfsg-1, 1.16.2+dfsg-1build1, 1.16.4+dfsg-1build1, 1.18.10+dfsg-2, 1.18.10+dfsg-3, 1.18.2+dfsg-1build1, 1.19.1+dfsg-1, 1.19.3+dfsg-1, 1.19.4+dfsg-1, 1.5.9-2, 1.5.9-3, 1.6.0-1, 1.6.1+ds-1, 1.6.1+ds-1ubuntu0.1~esm1, 1.6.6.2+ds-2build2, 1.6.6.3-1, 1.6.7-1, 1.6.7.1-1, 1.6.7.2-3, 1.6.7.2-3build1, 1.6.7.2-3ubuntu0.1, 1.8.0-1, 1.8.1-1, 1.8.1-1build1, 1.8.2-1build1, 1.8.2-1ubuntu0.1
Fixed versions
Not specified
CVEs
CVE-2026-57236
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 02:47 UTC · Revision 1

Source evidence

UBUNTU-CVE-2026-57236

core-osv · Original source

Published 25 Jun 2026, 15:16 UTC

Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, calling Document#encoding= with an invalid encoding (e.g., a non-string, or a string containing a null byte) raises an exception, but only after freeing the document's current encoding string without replacing it. The document is left referencing freed memory, so the next call to Document#encoding reads invalid memory, which can cause a segfault or leak freed bytes into a Ruby String. Affects the CRuby (libxml2) implementation only; JRuby is not affected. This vulnerability is fixed in 1.19.4.

osv:UBUNTU-CVE-2026-57236

ruby-nokogiri

Fixed versions: Not specified

ruby-nokogiri

Fixed versions: Not specified

ruby-nokogiri

Fixed versions: Not specified

ruby-nokogiri

Fixed versions: Not specified

ruby-nokogiri

Fixed versions: Not specified

ruby-nokogiri

Fixed versions: Not specified

ruby-nokogiri

Fixed versions: Not specified

ruby-nokogiri

Fixed versions: Not specified

ruby-nokogiri

Fixed versions: Not specified

Complete source record
{
  "id": "a69385f6a457f406cc98266429f7013b34b379ddc6a4e6d875d8845f009f579f",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2026-57236",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2026-57236",
    "summary": "Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, calling Document#encoding= with an invalid encoding (e.g., a non-string, or a string containing a null byte) raises an exception, but only after freeing the document's current encoding string without replacing it. The document is left referencing freed memory, so the next call to Document#encoding reads invalid memory, which can cause a segfault or leak freed bytes into a Ruby String. Affects the CRuby (libxml2) implementation only; JRuby is not affected. This vulnerability is fixed in 1.19.4.",
    "evidence": "osv:UBUNTU-CVE-2026-57236",
    "products": [
      {
        "name": {
          "value": "ruby-nokogiri",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.5.9-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.5.9-3",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.6.0-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.6.1+ds-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.6.1+ds-1ubuntu0.1~esm1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-nokogiri",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.6.6.2+ds-2build2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.6.6.3-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.6.7-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.6.7.1-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.6.7.2-3",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.6.7.2-3build1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.6.7.2-3ubuntu0.1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-nokogiri",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.8.0-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.8.1-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.8.1-1build1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.8.2-1build1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.8.2-1ubuntu0.1",
            "evidence": "/affected/2/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-nokogiri",
          "evidence": "/affected/3/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.10.3+dfsg1-2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "1.10.4+dfsg1-1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "1.10.7+dfsg1-1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "1.10.7+dfsg1-2",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "1.10.7+dfsg1-2build1",
            "evidence": "/affected/3/versions"
          },
          {
            "value": "1.10.7+dfsg1-2ubuntu0.1~esm2",
            "evidence": "/affected/3/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-nokogiri",
          "evidence": "/affected/4/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.11.1+dfsg-2ubuntu1",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "1.11.7+dfsg-3",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "1.11.7+dfsg-3build1",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "1.13.1+dfsg-2",
            "evidence": "/affected/4/versions"
          },
          {
            "value": "1.13.1+dfsg-2ubuntu0.1~esm1",
            "evidence": "/affected/4/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-nokogiri",
          "evidence": "/affected/5/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.14.3+dfsg-2",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "1.16.2+dfsg-1",
            "evidence": "/affected/5/versions"
          },
          {
            "value": "1.16.2+dfsg-1build1",
            "evidence": "/affected/5/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-nokogiri",
          "evidence": "/affected/6/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.16.4+dfsg-1build1",
            "evidence": "/affected/6/versions"
          },
          {
            "value": "1.18.2+dfsg-1build1",
            "evidence": "/affected/6/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-nokogiri",
          "evidence": "/affected/7/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.18.10+dfsg-3",
            "evidence": "/affected/7/versions"
          },
          {
            "value": "1.19.1+dfsg-1",
            "evidence": "/affected/7/versions"
          },
          {
            "value": "1.19.3+dfsg-1",
            "evidence": "/affected/7/versions"
          },
          {
            "value": "1.19.4+dfsg-1",
            "evidence": "/affected/7/versions"
          }
        ]
      },
      {
        "name": {
          "value": "ruby-nokogiri",
          "evidence": "/affected/8/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.18.2+dfsg-1build1",
            "evidence": "/affected/8/versions"
          },
          {
            "value": "1.18.10+dfsg-2",
            "evidence": "/affected/8/versions"
          },
          {
            "value": "1.18.10+dfsg-3",
            "evidence": "/affected/8/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "UBUNTU-CVE-2026-57236",
      "aliases": [
        "UBUNTU-CVE-2026-57236"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U"
        },
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-nokogiri",
            "purl": "pkg:deb/ubuntu/ruby-nokogiri?arch=source&distro=esm-infra-legacy%2Ftrusty",
            "ecosystem": "Ubuntu:Pro:14.04:LTS"
          },
          "versions": [
            "1.5.9-2",
            "1.5.9-3",
            "1.6.0-1",
            "1.6.1+ds-1",
            "1.6.1+ds-1ubuntu0.1~esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-57236.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-nokogiri",
                "binary_version": "1.6.1+ds-1ubuntu0.1~esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-nokogiri",
            "purl": "pkg:deb/ubuntu/ruby-nokogiri?arch=source&distro=xenial",
            "ecosystem": "Ubuntu:16.04:LTS"
          },
          "versions": [
            "1.6.6.2+ds-2build2",
            "1.6.6.3-1",
            "1.6.7-1",
            "1.6.7.1-1",
            "1.6.7.2-3",
            "1.6.7.2-3build1",
            "1.6.7.2-3ubuntu0.1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-57236.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-nokogiri",
                "binary_version": "1.6.7.2-3ubuntu0.1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-nokogiri",
            "purl": "pkg:deb/ubuntu/ruby-nokogiri?arch=source&distro=bionic",
            "ecosystem": "Ubuntu:18.04:LTS"
          },
          "versions": [
            "1.8.0-1",
            "1.8.1-1",
            "1.8.1-1build1",
            "1.8.2-1build1",
            "1.8.2-1ubuntu0.1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-57236.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-nokogiri",
                "binary_version": "1.8.2-1ubuntu0.1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-nokogiri",
            "purl": "pkg:deb/ubuntu/ruby-nokogiri?arch=source&distro=esm-apps%2Ffocal",
            "ecosystem": "Ubuntu:Pro:20.04:LTS"
          },
          "versions": [
            "1.10.3+dfsg1-2",
            "1.10.4+dfsg1-1",
            "1.10.7+dfsg1-1",
            "1.10.7+dfsg1-2",
            "1.10.7+dfsg1-2build1",
            "1.10.7+dfsg1-2ubuntu0.1~esm2"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-57236.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-nokogiri",
                "binary_version": "1.10.7+dfsg1-2ubuntu0.1~esm2"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-nokogiri",
            "purl": "pkg:deb/ubuntu/ruby-nokogiri?arch=source&distro=esm-apps%2Fjammy",
            "ecosystem": "Ubuntu:Pro:22.04:LTS"
          },
          "versions": [
            "1.11.1+dfsg-2ubuntu1",
            "1.11.7+dfsg-3",
            "1.11.7+dfsg-3build1",
            "1.13.1+dfsg-2",
            "1.13.1+dfsg-2ubuntu0.1~esm1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-57236.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-nokogiri",
                "binary_version": "1.13.1+dfsg-2ubuntu0.1~esm1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-nokogiri",
            "purl": "pkg:deb/ubuntu/ruby-nokogiri?arch=source&distro=noble",
            "ecosystem": "Ubuntu:24.04:LTS"
          },
          "versions": [
            "1.14.3+dfsg-2",
            "1.16.2+dfsg-1",
            "1.16.2+dfsg-1build1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-57236.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-nokogiri",
                "binary_version": "1.16.2+dfsg-1build1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-nokogiri",
            "purl": "pkg:deb/ubuntu/ruby-nokogiri?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "1.16.4+dfsg-1build1",
            "1.18.2+dfsg-1build1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-57236.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-nokogiri",
                "binary_version": "1.18.2+dfsg-1build1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-nokogiri",
            "purl": "pkg:deb/ubuntu/ruby-nokogiri?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "1.18.10+dfsg-3",
            "1.19.1+dfsg-1",
            "1.19.3+dfsg-1",
            "1.19.4+dfsg-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-57236.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-nokogiri",
                "binary_version": "1.19.4+dfsg-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "ruby-nokogiri",
            "purl": "pkg:deb/ubuntu/ruby-nokogiri?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "1.18.2+dfsg-1build1",
            "1.18.10+dfsg-2",
            "1.18.10+dfsg-3"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-57236.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "ruby-nokogiri",
                "binary_version": "1.18.10+dfsg-3"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:59:11.958633547Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-57236"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2026-57236",
        "https://www.cve.org/CVERecord?id=CVE-2026-57236",
        "https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-5v8h-3h3q-446p"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-57236",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/1/score"
  },
  "source_id": "core-osv",
  "document_id": 359417,
  "published_at": "2026-06-25T15:16:00+00:00"
}