6.4medium
AlchemyCMS has Authenticated Remote Code Execution (RCE) via eval injection in ResourcesHelper
- Severity
- 6.4medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.47% (higher than 42% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-2762-657x-v979
Description
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()`.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| AlchemyCMS alchemy_cms | < 7.4.12, >= 8.0.0.a, < 8.0.3 | CVE List |
| alchemy_cms (RubyGems) | before 7.4.12, from 8.0.0.a before 8.0.3 | GitHub Advisory Database |
| alchemy-cms alchemy_cms | before 7.4.12, from 8.0.0 before 8.0.3 | NVD |
All scores
| GitHub_M | 6.4medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 6.4medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.9critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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()`.
GitHub Advisory Database
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:
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
Screenshot From 2026-01-17 15-49-01NVD (es)
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()`.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-23885 changed 2026-01-21 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-2762-657x-v979 changed 2026-02-03 | CC-BY-4.0 |
| NVD | CVE-2026-23885 changed 2026-06-17 | Public domain |