{"id":"CVE-2026-23885","aliases":["CVE-2026-23885","GHSA-2762-657x-v979"],"related":[],"kind":"vulnerability","state":"published","title":"AlchemyCMS has Authenticated Remote Code Execution (RCE) via eval injection in ResourcesHelper","summary":"Alchemy is an open source content management system engine written in Ruby on Rails. Prior to versions 7.4.12 and 8.0.3, 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`. 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. Versions 7.4.12 and 8.0.3 fix the issue by replacing `eval()` with `send()`.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Alchemy is an open source content management system engine written in Ruby on Rails. Prior to versions 7.4.12 and 8.0.3, 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`. 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. Versions 7.4.12 and 8.0.3 fix the issue by replacing `eval()` with `send()`.","source":"cvelist"},{"lang":"en","text":"### 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\" />","format":"markdown","source":"ghsa"},{"lang":"es","text":"Alchemy es un motor de sistema de gestión de contenido de código abierto escrito en Ruby on Rails. Antes de las versiones 7.4.12 y 8.0.3, la aplicación utiliza la función `eval()` de Ruby para ejecutar dinámicamente una cadena proporcionada por el atributo `resource_handler.engine_name` en `Alchemy::ResourcesHelper#resource_url_proxy`. La vulnerabilidad existe en `app/helpers/alchemy/resources_helper.rb` en la línea 28. El código omite explícitamente el análisis de seguridad con `# rubocop:disable Security/Eval`, indicando que el uso de una función peligrosa era conocido pero no mitigado adecuadamente. Dado que `engine_name` se obtiene de definiciones de módulos que pueden ser influenciadas por configuraciones de administración, permite a un atacante autenticado escapar de la sandbox de Ruby y ejecutar comandos de sistema arbitrarios en el sistema operativo anfitrión. Las versiones 7.4.12 y 8.0.3 solucionan el problema reemplazando `eval()` por `send()`.","source":"nvd"}],"published":"2026-01-19T21:09:06.757Z","modified":"2026-06-17T10:22:15.387Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","score":6.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","score":6.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H","score":6.4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"}],"cwes":["CWE-95"],"affected":[{"ranges":[{"version":"< 7.4.12","status":"affected"},{"version":">= 8.0.0.a, < 8.0.3","status":"affected"}],"vendor":"AlchemyCMS","product":"alchemy_cms","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"7.4.12"}],"ecosystem":"RubyGems","package":"alchemy_cms","purl":"pkg:gem/alchemy_cms","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"8.0.0.a","status":"affected","fixed":"8.0.3"}],"ecosystem":"RubyGems","package":"alchemy_cms","purl":"pkg:gem/alchemy_cms","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"7.4.12"},{"status":"affected","introduced":"8.0.0","fixed":"8.0.3"}],"vendor":"alchemy-cms","product":"alchemy_cms","cpe":"cpe:2.3:a:alchemy-cms:alchemy_cms:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/AlchemyCMS/alchemy_cms/security/advisories/GHSA-2762-657x-v979","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/AlchemyCMS/alchemy_cms/commit/55d03ec600fd9e07faae1138b923790028917d26","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/AlchemyCMS/alchemy_cms/commit/563c4ce45bf5813b7823bf3403ca1fc32cb769e7","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/AlchemyCMS/alchemy_cms/releases/tag/v7.4.12","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/AlchemyCMS/alchemy_cms/releases/tag/v8.0.3","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23885","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/AlchemyCMS/alchemy_cms","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/alchemy_cms/CVE-2026-23885.yml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-01-21T21:08:44.539Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-23885","url":"https://www.cve.org/CVERecord?id=CVE-2026-23885","licence":"CVE Terms of Use","modified":"2026-01-21T21:12:51.110Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2762-657x-v979","url":"https://github.com/advisories/GHSA-2762-657x-v979","licence":"CC-BY-4.0","modified":"2026-02-03T03:13:41.820Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-23885","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23885","licence":"Public domain","modified":"2026-06-17T10:22:15.387Z"}],"updatedAt":"2026-11-25T22:59:12.960Z","epss":{"score":0.00472,"percentile":0.42459,"date":"2026-12-01T12:00:22.000Z"}}