page_controls_menu_js can reveal collection version of page
A page-controls endpoint returned different JavaScript depending on whether the supplied collection version ID matched the currently approved version, so an attacker could enumerate version IDs to learn which version of a page is live. On its own this only leaks the approved version number, which the author says could be combined with another attack.
- Triaged in 4 days
- Fixed in 4 days
- Disclosed after 4 days
By visiting the url /tools/required/page_controls_menu_js?cID=<cID>&cvID=<cvID>
Where cID = page cID and cvID is unknown,
If for cvID you start at 1 (and the currently approved version is not the first version) the code $(function() { ccmAlert.hud('This page is pending approval.', 5000); }); is added to the header.
If they increment the cvID to what the current approved version of a page, that line of code will go away. This discloses the currently approved version of a page (cvID of it).
This disclosure could be used with another attack to do harm to a site.
What the report shows
The target is Concrete CMS, and the feature under examination is the endpoint that serves the page controls menu JavaScript. The researcher found that this endpoint can be used to learn which version of a page is currently approved.
The request is a simple GET to the following path, with two query parameters:
Here cID is the page's collection ID and cvID is the collection version ID. The researcher's method was to hold cID fixed and vary cvID:
- Start with
cvID=1. If the currently approved version is not the first version, the response body contains this line, which the page then executes in the browser:
$(function() { ccmAlert.hud('This page is pending approval.', 5000); });
- Increment
cvIDand request the endpoint again. WhencvIDreaches the version that is currently approved, that line of code disappears from the response.
The presence or absence of that single line therefore acts as an oracle: the value of cvID at which the pending-approval notice vanishes is the currently approved version of the page. The report does not give a sample response, a version number, or any other detail of the environment.
The report does not state a severity, a CVSS score, a bounty amount or a fix. It was disclosed on 31 March 2014 and is classified as information disclosure.
Root cause
The menu JavaScript includes a status-dependent notice: the pending-approval line appears for versions that are not the approved one. The response differs observably between an unapproved version and the approved one, so the version number leaks through the content of the script rather than through any explicit field.
Impact
The report is explicit that the disclosure on its own is limited: it reveals the currently approved version of a page (its cvID). The researcher notes that this could be combined with another attack to harm a site, but does not describe such a chain. No data beyond the version identifier is claimed to be exposed.
How this kind of bug works
Many content management systems keep multiple versions of each object and mark one as published or approved. Supporting endpoints, such as scripts, styles, fragments or JSON helpers that render UI for a specific version, often branch on that state: they show a banner, a badge or a warning when the version is not the live one. If such an endpoint accepts a version identifier from the client and returns different output depending on the state, the difference itself is the leak. The bug class is a form of side channel through response content: no secret value is printed directly, but a boolean (approved or not) can be sampled across candidate identifiers until the state flips.
The underlying causes are usually one of: missing authorisation on the auxiliary endpoint, trusting a client-supplied identifier without checking it belongs to the caller or to a published object, or caching rules that let one user's version-specific response reach another. Defences are straightforward in principle: authorise every endpoint that touches versioned objects, return identical output for versions the caller may not inspect, and avoid embedding workflow state in assets served to unauthenticated users.
How to test for it
This class rewards patience with identifiers rather than clever payloads.
- Identify features with versioning or workflow: drafts, revisions, approvals, publishing states. Look for endpoints whose names suggest they render UI for a specific object version.
- Capture a legitimate request for such an endpoint while logged in, and note every identifier in the path, query string and body.
- Replay the request unauthenticated, or as a low-privileged user, and compare responses.
- Vary the version identifier across a range of small integers and record the response for each. A positive result is a stable, reproducible difference: a banner, a warning string, a status field or a different length that appears for some identifiers and not others, and that lines up with a version you know to be live.
- Confirm the mapping by checking the same identifiers against an authenticated view where you can see the true approved version.
Common false positives: differences caused by caching, by rate limiting, by localisation, or by the object simply not existing for some identifiers (a 404 versus a 200 is not the same as a state leak). Repeat requests to rule out noise, and make sure the difference is tied to the version state rather than to object existence or to your own session.
How it is fixed
Standard fixes for this bug class:
- Enforce authorisation on the auxiliary endpoint, not only on the main page, so that callers who cannot view a version cannot obtain its rendered assets.
- Return a uniform response for versions the caller is not entitled to inspect, so that approval state is not observable.
- Avoid embedding workflow notices in assets served to unauthenticated or low-privileged users; deliver them through an authenticated channel instead.
- Set cache headers so that version-specific responses are not shared between users.
Hunting notes
These bugs tend to hide in the plumbing around a core feature: menu scripts, toolbar fragments, autocomplete helpers, preview endpoints and anything that takes an object identifier plus a version or revision identifier. Recon signals include parameter names such as cvID, version, revision, draft and preview, and endpoints under paths like tools/required that look like internal helpers exposed to the web. Comparing responses across a small integer range is cheap and often enough.
To get a report accepted, show the oracle clearly: the exact request, the differing response for at least two identifiers, and proof that the flip corresponds to the real approved version. State the impact honestly, as this report does, and if you claim a chain with another attack, demonstrate it rather than asserting it.
What happened, in plain words
Concrete CMS is a system for building and running websites. Like many such systems, it keeps several versions of each page: you can edit a page, save a draft, and later have that draft approved and published. Only one version is live at any moment, and the system gives each version a number so it can tell them apart.
The researcher looked at a small helper address on the site, one that delivers a piece of JavaScript used by the page editing menu. JavaScript is the code a browser runs to make a page interactive; here it is a script the site hands to the browser so the editing controls work. The address is:
A request is simply the message your browser sends to a server asking for something, and a GET request is the ordinary kind used to fetch a page or file. The part after the question mark carries two values: cID identifies the page (the collection ID), and cvID identifies a particular version of that page (the collection version ID). The angle brackets are placeholders: you replace them with real numbers.
The researcher kept cID fixed and changed cvID step by step:
- Request the address with
cvID=1. If the version that is currently approved is not the first version, the script that comes back contains this line:
$(function() { ccmAlert.hud('This page is pending approval.', 5000); });
This line makes the browser show a small pop-up message saying the page is pending approval for five seconds. Its presence tells you that the version you asked about is not the approved one.
- Increase
cvIDby one and ask again. Keep going. At the momentcvIDmatches the version that is actually approved, that line disappears from the script.
So the missing line is the clue. The number at which the warning vanishes is the number of the live, approved version. The report gives no sample response and no version numbers from a real site.
Why does this matter? Because the address answers a question it was never meant to answer for a stranger. The researcher says the disclosure could be combined with another attack to harm a site, but does not describe such a combination. On its own, the report treats it as limited: it reveals the approved version number and nothing more.
The report does not state a severity rating, a score, a reward or a fix. It was made public on 31 March 2014 and filed as information disclosure, which simply means information escaping that should have stayed private.
In general, how this kind of bug works
This is a general explanation of the pattern, not a description of this particular site.
Think of a hotel receptionist who will not tell you which room a guest is in, but will happily say "not that one" for every room number you read out. Say enough numbers and you find the room. Nothing secret was printed; the yes-or-no answer did the work. Security people call such an indirect answer an oracle.
Content management systems often have many small supporting addresses around the main pages: scripts, styles, menu fragments, preview helpers. These are built for a specific version of an object and often change their output depending on whether that version is published. If such an address accepts a version number from the visitor and behaves differently for approved and unapproved versions, the difference itself leaks the answer. The usual causes are:
- the main page checks who you are, but the small helper address does not;
- the helper trusts a number supplied by the visitor without checking whether that visitor may see that version;
- caching lets one person's version-specific response reach someone else.
Testing for it needs patience rather than clever tricks:
- Look for features with versions or approval steps: drafts, revisions, publishing states.
- Note every number in the address of a legitimate request: in the path, after the question mark, and in the body.
- Send the same request without logging in, or as a user with fewer rights, and compare what comes back.
- Try a range of small numbers for the version value and record each response. A real finding is a stable difference, such as a warning line that appears for some numbers and not others, matching a version you know to be live.
- Check your mapping against a logged-in view where the true approved version is visible.
Watch for false alarms: differences caused by caching, by request limits, by language settings, or simply because some numbers do not exist. A "not found" reply is not the same as a state leak. Repeat requests to rule out noise.
Fixes follow the same logic: check permissions on the helper address as well as the main page, return identical output for versions the caller may not inspect, keep workflow notices out of files served to strangers, and set caching so one user's version-specific response is not shared with others.
Glossary
- Concrete CMS: a content management system used to build and run websites.
- Content management system (CMS): software for creating, editing and publishing website content without writing code by hand.
- Version: one saved copy of a page or object; several can exist at once.
- Approved / published version: the version that is currently live on the site.
- Pending approval: a saved version that is waiting to be approved before it goes live.
- JavaScript: code that runs in the browser to make pages interactive.
- Endpoint: a specific address on a server that accepts requests and returns something.
- Request: the message a browser sends to a server asking for a page, file or data.
- GET request: the ordinary request type used to fetch something.
- Query parameter: a name and value after the
?in an address, such ascvID=1. - cID (collection ID): the number identifying a page in Concrete CMS.
- cvID (collection version ID): the number identifying one version of a page.
- Response: what the server sends back, such as a page, a script or an error.
- Oracle: any observable difference in a response that lets someone infer a hidden fact, such as a yes-or-no answer.
- Information disclosure: a flaw where information that should stay private can be learned.
- Authentication: proving who you are, usually by logging in.
- Authorisation: deciding what a proven user is allowed to see or do.
- Reconnaissance: gathering background information about a target before attacking it.
- Side channel: learning something from an indirect effect, such as timing or response content, rather than from a direct answer.
- Caching: storing responses so they can be reused, which can accidentally share one user's data with another.
- False positive: a finding that looks like a flaw but is not.
- CVSS: a standard scoring system for rating the severity of a security flaw.