{"id":"CVE-2026-57435","state":"PUBLISHED","title":"Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Attr#value=` or `#content=`","description":"Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri’s CRuby native extension could leave a Ruby wrapper pointing to freed memory when replacing the value of an XML attribute. If Ruby code had already accessed an attribute child node, Nokogiri::XML::Attr#value= could free the underlying native child node while the wrapper remained reachable through the document node cache. A later use of the freed child node or a Ruby GC mark could dereference an invalid pointer, causing an invalid read and a possible segfault. This vulnerability is fixed in 1.19.4.","publishedAt":"2026-06-25T14:32:49.306Z","updatedAt":"2026-06-25T14:53:19.607Z","severity":{"score":1.7,"label":"Low","version":"4.0","vector":"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","source":"GitHub_M"},"assigner":"GitHub_M","products":["sparklemotion nokogiri"],"affected":[{"vendor":"sparklemotion","product":"nokogiri","versions":[{"version":"< 1.19.4","status":"affected"}]}],"references":["https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-phwj-rprq-35pp"],"weaknesses":["CWE-416","CWE-825"],"ingestedAt":"2026-10-29T20:12:24.861Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/57xxx/CVE-2026-57435.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-57435","state":"PUBLISHED","datePublished":"2026-06-25T14:32:49.306Z","dateUpdated":"2026-06-25T14:53:19.607Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-06-24T13:21:20.728Z"},"containers":{"cna":{"title":"Nokogiri: Possible Use-After-Free when setting an attribute value via `Nokogiri::XML::Attr#value=` or `#content=`","descriptions":[{"lang":"en","value":"Nokogiri is an open source XML and HTML library for the Ruby programming language. Prior to 1.19.4, Nokogiri’s CRuby native extension could leave a Ruby wrapper pointing to freed memory when replacing the value of an XML attribute. If Ruby code had already accessed an attribute child node, Nokogiri::XML::Attr#value= could free the underlying native child node while the wrapper remained reachable through the document node cache. A later use of the freed child node or a Ruby GC mark could dereference an invalid pointer, causing an invalid read and a possible segfault. This vulnerability is fixed in 1.19.4."}],"affected":[{"vendor":"sparklemotion","product":"nokogiri","versions":[{"version":"< 1.19.4","status":"affected"}]}],"references":[{"url":"https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-phwj-rprq-35pp","name":"https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-phwj-rprq-35pp","tags":["x_refsource_CONFIRM"]}],"metrics":[{"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnAvailabilityImpact":"LOW","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","baseScore":1.7,"baseSeverity":"LOW","vectorString":"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","version":"4.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","lang":"en","description":"CWE-416: Use After Free","type":"CWE"}]},{"descriptions":[{"cweId":"CWE-825","lang":"en","description":"CWE-825: Expired Pointer Dereference","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-06-25T14:32:49.306Z"},"source":{"advisory":"GHSA-phwj-rprq-35pp","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-25T14:53:12.909230Z","id":"CVE-2026-57435","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-25T14:53:19.607Z"}}]}}}