Vulnerabilities in pkg:gem/alchemy_cms
PACKAGEGHSA-mqq5-j7w8-2hgh is a HIGH (CVSS 7.5) unauthenticated nested page api leaks vulnerability (CWE-862: Missing Authorization) affecting AlchemyCMS libraries in the RubyGems ecosystem. The issue involves unauthenticated nested page api leaks restricted & unpublished content. Remediation is available by upgrading affected packages to version 8.2.6, 8.1.14, 8.0.15, 7.4.15.
pkg:gem/alchemy_cms
Vulnerability advisories affecting package pkg:gem/alchemy_cms. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-mqq5-j7w8-2hgh | - | HIGH | AlchemyCMS: Unauthenticated nested page API leaks restricted & unpublished content |
| GHSA-2762-657x-v979 | CVE-2026-23885 | MODERATE | AlchemyCMS: Authenticated Remote Code Execution (RCE) via eval injection in ResourcesHelper |
| GHSA-7mj4-2984-955f | CVE-2018-18307 | MODERATE | Withdrawn Advisory: AlchemyCMS is vulnerable to stored XSS via the /admin/pictures image field |
GHSA-mqq5-j7w8-2hgh at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix GHSA-mqq5-j7w8-2hgh
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.
Upgrade alchemy_cms to 8.2.6
Upgrade alchemy_cms to 8.1.14
Upgrade alchemy_cms to 8.0.15
Upgrade alchemy_cms to 7.4.15
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 GHSA-mqq5-j7w8-2hgh, 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 8.2.6), 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-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. 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
GHSA-mqq5-j7w8-2hgh Affected AlchemyCMS Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
alchemy_cms
|
RubyGems |
≥ 8.2.0
< 8.2.6
|
8.2.6
|
|
alchemy_cms
|
RubyGems |
≥ 8.1.0
< 8.1.14
|
8.1.14
|
|
alchemy_cms
|
RubyGems |
≥ 8.0.0.a
< 8.0.15
|
8.0.15
|
|
alchemy_cms
|
RubyGems |
< 7.4.15
|
7.4.15
|
References
Frequently Asked Questions
What is GHSA-mqq5-j7w8-2hgh?
Which AlchemyCMS versions are affected?
What version fixes GHSA-mqq5-j7w8-2hgh?
Is alchemy_cms affected?
What is the CVSS score of GHSA-mqq5-j7w8-2hgh?
What CWE is associated with GHSA-mqq5-j7w8-2hgh?
How can I check RubyGems dependencies for GHSA-mqq5-j7w8-2hgh?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-mqq5-j7w8-2hgh",
"modified" : "2026-06-19T17:47:13Z",
"published" : "2026-06-19T17:47:13Z",
"aliases" : [ ],
"summary" : "AlchemyCMS: Unauthenticated nested page API leaks restricted & unpublished content",
"details" : "# Unauthenticated nested page API leaks restricted & unpublished content\n\n- **Location:** `app/controllers/alchemy/api/pages_controller.rb:28` (`Api::PagesController#nested`)\n- **Affected version:** Alchemy CMS 8.3.0.dev (Rails 8.1.3)\n\n## Description\n\nThe unauthenticated `GET /api/pages/nested` endpoint returns the full page tree to any anonymous caller, including restricted (member-only) pages and unpublished/draft pages that should be hidden.\nAppending `?elements=true` additionally dumps the element/ingredient **content** of restricted pages, fully bypassing the access control the sibling `show` and `index` actions enforce.\n\n## Root cause\n\n`Api::PagesController#nested` calls no `authorize!` and applies no `published`/`restricted` scoping, unlike `show` (`authorize! :show`) and `index` (`accessible_by(current_ability, :index)`).\n`PageTreePreloader` loads `page.self_and_descendants` unfiltered, and `PageTreeSerializer` emits every page's metadata (and, with `elements`, `public_version.elements`) with no ability check.\n\n## Evidence\n\nAn unauthenticated `GET /api/pages/nested` returns HTTP 200 with the restricted page (`\"restricted\":true`) and an unpublished draft (`\"public\":false`); `?elements=true` leaks its content (e.g. `TOPSECRET_RESTRICTED_BODY_proof123`).\nThe same guest hitting `GET /api/pages/3` (`show`) gets HTTP **403** `{\"error\":\"Not authorized\"}`, proving `nested` returns what `show` correctly denies.\n\n### Reproduction\n\n```bash\n# 1) Metadata leak (guest, no auth)\ncurl -s http://localhost:3000/api/pages/nested | python3 -m json.tool | grep -E '\"name\"|\"restricted\"|\"public\"'\n\n# 2) Content leak of restricted page\ncurl -s \"http://localhost:3000/api/pages/nested?elements=true\" | grep -oE 'TOPSECRET_RESTRICTED_BODY_[A-Za-z0-9]+|RESTRICTED_RICHTEXT_[A-Za-z0-9]+'\n\n# 3) Contrast — show denies the same guest\ncurl -s -o /dev/null -w \"show /api/pages/3 -> HTTP %{http_code}\\n\" http://localhost:3000/api/pages/3\n```\n\n### Suggested fix\n\n```ruby\ndef nested\n @page = Page.find_by(id: params[:page_id]) || Language.current_root_page\n authorize! :show, @page\n preloaded_page = PageTreePreloader.new(page: @page, user: current_alchemy_user, ability: current_ability).call\n render json: PageTreeSerializer.new(preloaded_page, ability: current_ability,\n user: current_alchemy_user, elements: params[:elements])\nend\n```\n\nAdditionally scope `PageTreePreloader`'s `self_and_descendants` via `accessible_by(current_ability)` and gate element emission in `PageTreeSerializer#page_elements` behind `opts[:ability].can?(:show, page)`.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "alchemy_cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.2.0"
}, {
"fixed" : "8.2.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 8.2.5"
}
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "alchemy_cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.1.0"
}, {
"fixed" : "8.1.14"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 8.1.13"
}
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "alchemy_cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0.a"
}, {
"fixed" : "8.0.15"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 8.0.14"
}
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "alchemy_cms"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.4.15"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 7.4.14"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/AlchemyCMS/alchemy_cms/security/advisories/GHSA-mqq5-j7w8-2hgh"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/AlchemyCMS/alchemy_cms"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-862" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-19T17:47:13Z",
"nvd_published_at" : null
}
}