{"id":"GHSA-2762-657x-v979","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\u003cimg 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\" /\u003e","aliases":["CVE-2026-23885"],"modified":"2026-02-03T03:13:41.820036Z","published":"2026-01-21T01:04:32Z","database_specific":{"severity":"MODERATE","nvd_published_at":"2026-01-19T22:16:02Z","cwe_ids":["CWE-95"],"github_reviewed":true,"github_reviewed_at":"2026-01-21T01:04:32Z"},"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"}],"affected":[{"package":{"name":"alchemy_cms","ecosystem":"RubyGems","purl":"pkg:gem/alchemy_cms"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.4.12"}]}],"versions":["2.0","2.0.1","2.0.2","2.0.3","2.0.3.1","2.0.4","2.0.5","2.0.6.1","2.0.7","2.0.pre2","2.0.pre3","2.0.pre4","2.0.pre5","2.0.rc1","2.0.rc2","2.0.rc3","2.0.rc4","2.0.rc5","2.0.rc6","2.1","2.1.1","2.1.11","2.1.12","2.1.2","2.1.3","2.1.4","2.1.5","2.1.6","2.1.7","2.1.8","2.1.8.1","2.1.9","2.1.9.1","2.1.beta1","2.1.beta5","2.1.beta6","2.1.rc2","2.1.rc3","2.1.rc4","2.1.rc5","2.1.rc6","2.2.0","2.2.1","2.2.2","2.2.3.1","2.2.3.2","2.2.4","2.2.rc1","2.2.rc11","2.2.rc13","2.2.rc14","2.2.rc15","2.2.rc2","2.2.rc3","2.2.rc6","2.2.rc7","2.2.rc8","2.3.0","2.3.1","2.3.2","2.3.rc5","2.4.0","2.4.1","2.4.beta2","2.4.rc1","2.4.rc2","2.4.rc4","2.5.0","2.5.0.b2","2.5.0.b5","2.5.0.b9","2.5.0.rc3","2.5.1","2.5.2","2.5.2.1","2.5.2.2","2.5.3","2.5.3.1","2.6.0","2.6.0.rc5","2.6.1","2.6.2","2.6.2.1","2.6.3","2.7.0","2.7.1","2.7.2","2.7.3","2.7.4","2.7.5","2.8.1","2.8.2","2.8.3","2.9.0","2.9.1","3.0.0","3.0.0.rc5","3.0.0.rc6","3.0.0.rc7","3.0.0.rc8","3.0.1","3.0.2","3.0.3","3.0.4","3.1.0","3.1.0.beta1","3.1.0.beta2","3.1.0.beta3","3.1.0.beta4","3.1.0.beta5","3.1.0.beta6","3.1.0.rc1","3.1.0.rc2","3.1.0.rc3","3.1.1","3.1.3","3.2.0","3.2.0.beta","3.2.0.rc1","3.2.1","3.3.0","3.3.0.rc1","3.3.0.rc2","3.3.1","3.3.2","3.3.3","3.4.0","3.4.0.rc1","3.4.1","3.4.2","3.5.0","3.5.0.rc1","3.5.0.rc2","3.6.0","3.6.1","3.6.2","3.6.3","3.6.4","3.6.5","3.6.6","3.6.7","4.0.0","4.0.0.beta","4.0.0.rc1","4.0.0.rc2","4.0.1","4.0.2","4.0.3","4.0.4","4.0.5","4.0.6","4.1.0","4.1.0.beta","4.1.0.rc1","4.1.1","4.1.2","4.2.0","4.2.0.rc1","4.2.1","4.2.2","4.2.3","4.2.4","4.3.0","4.3.1","4.3.2","4.4.0","4.4.1","4.4.2","4.4.3","4.4.4","4.4.5","4.5.0","4.5.1","4.6.0","4.6.1","4.6.2","4.6.3","4.6.4","4.6.5","4.6.6","4.6.7","5.0.0","5.0.0.beta1","5.0.0.beta2","5.0.0.rc1","5.0.0.rc2","5.0.1","5.0.10","5.0.2","5.0.3","5.0.4","5.0.5","5.0.6","5.0.7","5.0.8","5.0.9","5.1.0","5.1.0.beta1","5.1.0.beta2","5.1.0.rc1","5.1.1","5.1.10","5.1.2","5.1.3","5.1.4","5.1.5","5.1.6","5.1.7","5.1.8","5.1.9","5.2.0","5.2.0.b1","5.2.0.rc1","5.2.1","5.2.2","5.2.3","5.2.4","5.2.5","5.2.6","5.2.7","5.3.0","5.3.1","5.3.2","5.3.3","5.3.4","5.3.5","5.3.6","5.3.7","5.3.8","6.0.0","6.0.0.b1","6.0.0.b2","6.0.0.b3","6.0.0.pre.b4","6.0.0.pre.b5","6.0.0.pre.b6","6.0.0.pre.rc1","6.0.0.pre.rc2","6.0.0.pre.rc3","6.0.0.pre.rc4","6.0.0.pre.rc5","6.0.0.pre.rc6","6.0.0.pre.rc7","6.0.1","6.0.10","6.0.11","6.0.12","6.0.13","6.0.14","6.0.2","6.0.3","6.0.4","6.0.5","6.0.6","6.0.7","6.0.8","6.0.9","6.1.0","6.1.1","6.1.10","6.1.2","6.1.3","6.1.4","6.1.5","6.1.6","6.1.7","6.1.8","6.1.9","7.0.0","7.0.0.pre.a","7.0.0.pre.b","7.0.0.pre.c","7.0.0.pre.rc1","7.0.1","7.0.10","7.0.11","7.0.12","7.0.13","7.0.14","7.0.15","7.0.16","7.0.2","7.0.3","7.0.4","7.0.5","7.0.6","7.0.7","7.0.8","7.0.9","7.1.0","7.1.0.pre.b1","7.1.0.pre.b2","7.1.0.pre.rc1","7.1.1","7.1.10","7.1.11","7.1.12","7.1.13","7.1.2","7.1.3","7.1.4","7.1.5","7.1.6","7.1.7","7.1.8","7.1.9","7.2.0","7.2.0.b","7.2.0.rc1","7.2.0.rc2","7.2.1","7.2.2","7.2.3","7.2.4","7.2.5","7.2.6","7.2.7","7.2.8","7.2.9","7.3.0","7.3.1","7.3.2","7.3.3","7.3.4","7.3.5","7.3.6","7.3.7","7.3.8","7.4.0","7.4.1","7.4.10","7.4.11","7.4.2","7.4.3","7.4.4","7.4.5","7.4.6","7.4.7","7.4.8","7.4.9"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/01/GHSA-2762-657x-v979/GHSA-2762-657x-v979.json"}},{"package":{"name":"alchemy_cms","ecosystem":"RubyGems","purl":"pkg:gem/alchemy_cms"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"8.0.0.a"},{"fixed":"8.0.3"}]}],"versions":["8.0.0","8.0.0.a","8.0.0.b","8.0.0.c","8.0.1","8.0.2"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/01/GHSA-2762-657x-v979/GHSA-2762-657x-v979.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H"}]}