Skip to content

[Aikido] Fix 26 security issues in activestorage, nokogiri, rails-html-sanitizer and 3 more - #348

Open
aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/AIK-17954-update-packages-79598804-raxh
Open

[Aikido] Fix 26 security issues in activestorage, nokogiri, rails-html-sanitizer and 3 more#348
aikido-autofix[bot] wants to merge 1 commit into
mainfrom
fix/AIK-17954-update-packages-79598804-raxh

Conversation

@aikido-autofix

@aikido-autofix aikido-autofix Bot commented Aug 2, 2026

Copy link
Copy Markdown

Upgrade dependencies to fix critical arbitrary file read and RCE vulnerabilities in Active Storage libvips handling, plus Nokogiri canonicalization bypass and memory leak issues.

✅ 26 CVEs resolved by this upgrade

This PR will resolve the following CVEs:

Issue Severity           Description
CVE-2026-66066
MEDIUM
[activestorage] Unsafe libvips operations are not disabled for untrusted image uploads, allowing attackers to read arbitrary files and environment variables accessible to the Rails process. This can lead to credential exposure and remote code execution.
AIKIDO-2026-333731
MEDIUM
[activestorage] Crafted uploaded images can exploit libvips unfuzzed loaders/savers to read arbitrary files and environment variables during variant processing, potentially leading to RCE. An unauthenticated attacker can trigger this via file upload and variant processing to access sensitive credentials.
GHSA-5prr-v3j2-97mh
LOW
[nokogiri] Out-of-bounds read vulnerability in NodeSet indexing allows attackers to pass large negative indices that bypass bounds checks, causing denial of service via process crash or potential memory disclosure. On CRuby, this results in an out-of-bounds read; on JRuby, it returns incorrect nodes.
GHSA-v2fc-qm4h-8hqv
LOW
[nokogiri] XSLT transform leaks small heap allocations when passed Ruby strings containing null bytes, potentially enabling denial of service attacks on long-running processes through sustained attacker-controlled input. Memory corruption and information disclosure do not occur.
GHSA-wx95-c6cv-8532
LOW
[nokogiri] Canonicalization failure in canonicalize methods returns empty string instead of raising an exception, allowing downstream libraries to accept invalid XML and bypass signature validation in SAML implementations.
GHSA-c4rq-3m3g-8wgx
LOW
[nokogiri] CSS selector tokenizer contains regular expressions vulnerable to ReDoS attacks on adversarial selectors, allowing attackers to cause exponential regex backtracking and denial of service through CSS parsing methods.
GHSA-8678-w3jw-xfc2
LOW
[nokogiri] JRuby implementation did not properly enforce the NONET parse option, allowing external resources to be fetched over the network and potentially enabling SSRF or XXE attacks on XML schemas parsed with default options.
GHSA-wfpw-mmfh-qq69
LOW
[nokogiri] XInclude substitution in do_xinclude freed nodes and namespaces that were already exposed to Ruby, leaving objects pointing at freed memory and causing potential invalid reads/writes. This affects CRuby only when XInclude is called after traversing the document tree.
GHSA-5v8h-3h3q-446p
LOW
[nokogiri] Setting an invalid encoding on a Document causes a use-after-free vulnerability, potentially leading to segfaults or memory disclosure. This requires an unusual API pattern of assigning invalid encoding, catching the exception, and continuing to use the document.
GHSA-9cv2-cfxc-v4v2
LOW
[nokogiri] NULL pointer dereference in native wrapper classes when calling methods on uninitialized objects allocated directly via .allocate, causing process crashes. This requires direct misuse of the API and cannot be triggered by untrusted input.
GHSA-p67v-3w7g-wjg7
LOW
[nokogiri] XPathContext did not keep its source document alive for garbage collection, potentially causing memory reads and segfaults if the document was collected while the context remained in use. This only affects direct XPathContext construction with an unreachable document; normal Document search methods are unaffected.
GHSA-phwj-rprq-35pp
LOW
[nokogiri] Use-after-free vulnerability in XML attribute value replacement that could cause a segfault when accessing previously-wrapped attribute child nodes. Requires unusual API usage pattern combining direct child node access with subsequent attribute value mutation.
GHSA-wjv4-x9w8-wm3h
LOW
[nokogiri] A heap use-after-free vulnerability exists when setting a non-element node (like a DTD) as the document root via Document#root=, potentially causing segfaults or invalid memory reads. The vulnerability requires programming error and cannot be triggered by untrusted input.
GHSA-cj75-f6xr-r4g7
LOW
[rails-html-sanitizer] A cross-site scripting (XSS) vulnerability exists when the sanitizer is configured to allow SVG reference elements like <use>. This permits attackers to inject malicious scripts through SVG local references.
AIKIDO-2026-663658
LOW
[rails-html-sanitizer] A Cross-site Scripting (XSS) vulnerability exists due to incomplete attribute restrictions on SVG elements, allowing href attributes to reference external documents and potentially execute scripts or load external content for tracking purposes.
AIKIDO-2026-622262
LOW
[loofah] HTML5 sanitizer fails to restrict the href attribute on SVG elements, allowing Cross-site Scripting (XSS) attacks through external document references in elements like <use> and <feImage>. This enables arbitrary script execution or external content loading when sanitizing user-supplied SVG.
GHSA-9wjq-cp2p-hrgf
LOW
[loofah] Loofah's HTML5 sanitizer failed to restrict the href attribute on SVG elements, allowing external document references that could execute scripts or enable tracking through SVG and elements.
AIKIDO-2026-349881
LOW
[loofah] A Cross-site Scripting (XSS) vulnerability exists due to improper validation of URIs with numeric character references lacking trailing semicolons, allowing malicious scripts like javascript&#58alert(1) to bypass filtering and execute in browsers.
AIKIDO-2026-498891
LOW
[loofah] A vulnerability in the allowed_uri? helper fails to reject javascript: URIs when the scheme is split by HTML5 named character references like &Tab; or &NewLine;, allowing attackers to bypass URI validation and execute arbitrary JavaScript. This affects callers of the public helper method and higher-level features like Action Text markdown link validation that render approved URIs into HTML attributes.
GHSA-5qhf-9phg-95m2
LOW
[loofah] A bypass vulnerability in URI validation allows javascript: and vbscript: schemes to evade filtering when split by numeric character references without trailing semicolons, enabling XSS attacks through browser URI decoding.
GHSA-8whx-365g-h9vv
LOW
[loofah] A bypass vulnerability in URI scheme validation allows javascript: URIs to be executed when prefixed with HTML5 named character references ( or ), circumventing existing security filters and enabling XSS attacks.
AIKIDO-2026-769167
LOW
[json] A heap use-after-free vulnerability in the resumable parser allows attackers to crash the Ruby process by feeding crafted truncated JSON with duplicate keys and calling partial_value, which reads freed memory through stale state pointers.
AIKIDO-2026-11126
LOW
[sqlite3] A use-after-free vulnerability in aggregate function callbacks allows stepping prepared statements after database closure to trigger invalid memory reads and segmentation faults, causing denial of service in applications using custom aggregates.
AIKIDO-2026-11127
LOW
[sqlite3] User-defined SQLite functions with duplicate names and different argument counts can cause invalid memory reads and process crashes due to premature garbage collection of referenced Ruby blocks. This denial-of-service vulnerability affects applications using create_function or define_function.
CVE-2026-54619
LOW
[sqlite3] A use-after-free vulnerability exists when redefining a SQLite function with different arity, as the previous handler is freed while SQLite may still reference it. This can lead to remote code execution or denial of service.
CVE-2026-54620
LOW
[sqlite3] provides Ruby bindings for the SQLite3 embedded database. From 2.1.0 to 2.9.4, the callbacks used for SQLite aggregate functions can be freed while still referenced during aggregation, resulting in a use-after-free. This issue is fixed in version 2.9.5.
🔗 Related Tasks

@codecov

codecov Bot commented Aug 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants