CVE-2026-23885: AlchemyCMS Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-2762-657x-v979
CVSS 6.4
CWE-95
Published
Advisory Summary

CVE-2026-23885 is a MODERATE (CVSS 6.4) remote code execution vulnerability (CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')) affecting AlchemyCMS libraries in the RubyGems ecosystem. The issue involves authenticated remote code execution (rce) via eval injection in resourceshelper. Remediation is available by upgrading affected packages to version 7.4.12, 8.0.3.

CVE-2026-23885 at a Glance

CVE Identifier CVE-2026-23885
GHSA Identifier GHSA-2762-657x-v979
Severity MODERATE
CVSS v3.1 Base Score 6.4
CWE Classification CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection')
Affected Product AlchemyCMS
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 6.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-23885

To remediate this vulnerability, upgrade all affected AlchemyCMS dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

alchemy_cms fixed: 7.4.12
Upgrade alchemy_cms to 7.4.12
alchemy_cms fixed: 8.0.3
Upgrade alchemy_cms to 8.0.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for alchemy_cms

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-23885, inspect your project dependencies for AlchemyCMS:

inspect dependencies for alchemy_cms

Analyze the terminal output to locate any version of AlchemyCMS in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.4.12), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection'), where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. "eval"). In AlchemyCMS, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary A vulnerability was discovered during a manual security audit of the AlchemyCMS source code. The application uses the Ruby `eval()` function to dynamically execute a string provided by the `resource_handler.engine_name` attribute in `Alchemy::ResourcesHelper#resource_url_proxy`. ### Details The vulnerability exists in `app/helpers/alchemy/resources_helper.rb` at line 28. The code explicitly bypasses security linting with `# rubocop:disable Security/Eval`, indicating that the use of a dangerous function was known but not properly mitigated. Since `engine_name` is sourced from module definitions that can be influenced by administrative configurations, it allows an authenticated attacker to escape the Ruby sandbox and execute arbitrary system commands on the host OS. But, for this attack to be possible local file access to the alchemy project or the source on a remote server is necessary in order to manipulate the module config file, though. ### PoC (Proof of Concept) The following standalone Ruby script demonstrates that the `eval` sink is directly exploitable: ```ruby require 'ostruct' def resource_url_proxy(resource_handler) if resource_handler.engine_name && !resource_handler.engine_name.empty? eval(resource_handler.engine_name) end end # Payload to create a file in /tmp directory payload = "system('touch /tmp/alchemy_rce_verified'); 'main_app'" handler = OpenStruct.new(engine_name: payload) resource_url_proxy(handler) if File.exist?('/tmp/alchemy_rce_verified') puts "RCE Verified: Command executed successfully." end ``` <img width="1909" height="885" alt="Screenshot From 2026-01-17 15-49-01" src="https://github.com/user-attachments/assets/07929d46-c839-4d3c-9b74-916bd87819ad" />

CVE-2026-23885 Affected AlchemyCMS Versions

2 component(s)
Fixed Versions:
7.4.128.0.3
Product / Package Ecosystem Affected Versions Fixed Version
alchemy_cms
RubyGems
< 7.4.12
7.4.12
alchemy_cms
RubyGems
≥ 8.0.0.a
< 8.0.3
8.0.3

References

Frequently Asked Questions

What is CVE-2026-23885?
CVE-2026-23885 is a security vulnerability in AlchemyCMS involving Authenticated Remote Code Execution (RCE) via eval injection in ResourcesHelper under CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection').
Which AlchemyCMS versions are affected?
Affected versions include releases prior to 7.4.12, 8.0.3 across affected packages: alchemy_cms.
What version fixes CVE-2026-23885?
Upgrading to 7.4.12, 8.0.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is alchemy_cms affected?
Yes, alchemy_cms is affected in releases prior to 7.4.12, 8.0.3. Upgrade your dependency to 7.4.12, 8.0.3 or later.
What is the CVSS score of CVE-2026-23885?
CVE-2026-23885 has a CVSS v3.1 base score of 6.4 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-23885?
CVE-2026-23885 is classified under CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code ('Eval Injection') (The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. "eval").).
How can I check RubyGems dependencies for CVE-2026-23885?
Run the dependency tree command: 'inspect dependencies for alchemy_cms'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2762-657x-v979",
  "modified" : "2026-02-02T14:44:59Z",
  "published" : "2026-01-21T01:04:32Z",
  "aliases" : [ "CVE-2026-23885" ],
  "summary" : "AlchemyCMS: Authenticated Remote Code Execution (RCE) via eval injection in ResourcesHelper",
  "details" : "### Summary\nA vulnerability was discovered during a manual security audit of the AlchemyCMS source code. The application uses the Ruby `eval()` function to dynamically execute a string provided by the `resource_handler.engine_name` attribute in `Alchemy::ResourcesHelper#resource_url_proxy`.\n\n### Details\nThe vulnerability exists in `app/helpers/alchemy/resources_helper.rb` at line 28. The code explicitly bypasses security linting with `# rubocop:disable Security/Eval`, indicating that the use of a dangerous function was known but not properly mitigated. \n\nSince `engine_name` is sourced from module definitions that can be influenced by administrative configurations, it allows an authenticated attacker to escape the Ruby sandbox and execute arbitrary system commands on the host OS.\n\nBut, for this attack to be possible local file access to the alchemy project or the source on a remote server is necessary in order to manipulate the module config file, though.\n\n### PoC (Proof of Concept)\nThe following standalone Ruby script demonstrates that the `eval` sink is directly exploitable:\n\n```ruby\nrequire 'ostruct'\n\ndef resource_url_proxy(resource_handler)\n  if resource_handler.engine_name && !resource_handler.engine_name.empty?\n    eval(resource_handler.engine_name)\n  end\nend\n\n# Payload to create a file in /tmp directory\npayload = \"system('touch /tmp/alchemy_rce_verified'); 'main_app'\"\nhandler = OpenStruct.new(engine_name: payload)\n\nresource_url_proxy(handler)\n\nif File.exist?('/tmp/alchemy_rce_verified')\n  puts \"RCE Verified: Command executed successfully.\"\nend\n```\n\n\n<img width=\"1909\" height=\"885\" alt=\"Screenshot From 2026-01-17 15-49-01\" src=\"https://github.com/user-attachments/assets/07929d46-c839-4d3c-9b74-916bd87819ad\" />",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "alchemy_cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.4.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "alchemy_cms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0.a"
      }, {
        "fixed" : "8.0.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/AlchemyCMS/alchemy_cms/security/advisories/GHSA-2762-657x-v979"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-23885"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AlchemyCMS/alchemy_cms/commit/55d03ec600fd9e07faae1138b923790028917d26"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AlchemyCMS/alchemy_cms/commit/563c4ce45bf5813b7823bf3403ca1fc32cb769e7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/AlchemyCMS/alchemy_cms"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AlchemyCMS/alchemy_cms/releases/tag/v7.4.12"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AlchemyCMS/alchemy_cms/releases/tag/v8.0.3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/alchemy_cms/CVE-2026-23885.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-95" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-21T01:04:32Z",
    "nvd_published_at" : "2026-01-19T22:16:02Z"
  }
}