# GHSA-wrrw-crp8-979q: Pageflow vulnerable to sensitive user data extraction via Ransack query injection

> Attackers with low privileges can extract sensitive user data via Ransack query injection in Pageflow's ActiveAdmin interface.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 Sep 2022

## What is GHSA-wrrw-crp8-979q?

GHSA-wrrw-crp8-979q is a vulnerability in pageflow, published on 15 Sep 2022. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

### Impact

The attack allows extracting sensitive properties of database objects that are associated with users or entries belonging to an account that the attacker has access to.

Pageflow uses the `ActiveAdmin` Ruby library to provide some management features to its users. `ActiveAdmin` relies on the `Ransack` library to implement search functionality. In its default configuration, `Ransack` will allow for query conditions based on properties of associated database objects [1]. The `*_starts_with`, `*_ends_with` or `*_contains` search matchers [2] can then be abused to exfiltrate sensitive string values of associated database objects via character-by-character brute-force.

[1] https://activerecord-hackery.github.io/ransack/going-further/associations/
[2] https://activerecord-hackery.github.io/ransack/getting-started/search-matches/

### Mitigation

Upgrade to version 15.7.1 or 14.5.2 of the `pageflow` gem.

### For more information

If you have any questions or comments about this advisory email us at info(at)codevise.de 

### Credits

[Positive Security](https://positive.security/)

## Which versions are affected by GHSA-wrrw-crp8-979q?

4 open source packages ship an affected version, including pageflow.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pageflow` | RubyGems | All versions | 14.5.2 |
| `pageflow` | RubyGems | All versions | 14.5.2 |
| `pageflow` | RubyGems | From 15.0.0 | 15.7.1 |
| `pageflow` | RubyGems | From 15.0.0 | 15.7.1 |

## How do I fix GHSA-wrrw-crp8-979q?

Upgrade pageflow to a fixed version for your release line: 14.5.2 or 15.7.1.

## Is GHSA-wrrw-crp8-979q being exploited?

There is no known exploitation of GHSA-wrrw-crp8-979q in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-wrrw-crp8-979q and fix it if it is affected.

What it is: GHSA-wrrw-crp8-979q is a vulnerability in pageflow, published on 15 Sep 2022. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-wrrw-crp8-979q in the wild and no public exploit code.

Affected packages and fixed versions:
- pageflow (RubyGems): affected all versions; fixed in 14.5.2
- pageflow (RubyGems): affected all versions; fixed in 14.5.2
- pageflow (RubyGems): affected from 15.0.0; fixed in 15.7.1
- pageflow (RubyGems): affected from 15.0.0; fixed in 15.7.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-wrrw-crp8-979q/ (Markdown: https://insights.sbomify.com/GHSA-wrrw-crp8-979q/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-wrrw-crp8-979q

---
From sbomify Insights: https://insights.sbomify.com/GHSA-wrrw-crp8-979q/
Summaries are generated and may contain mistakes; the official description above is the record.
