# GHSA-x5w2-wcr8-9q45: Silverstripe Missing security check on dev/build/defaults

> Unauthenticated attackers can trigger database modifications and view schema details via the unprotected /dev/build/defaults endpoint in Silverstripe.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 May 2024

## What is GHSA-x5w2-wcr8-9q45?

GHSA-x5w2-wcr8-9q45 is a missing authorization vulnerability in silverstripe/framework, published on 23 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The buildDefaults method on DevelopmentAdmin is missing a permission check.

In live mode, if you access /dev/build, you are requested to login first. However, if you access /dev/build/defaults, then the action is performed without any login check. This should be protected in the same way that /dev/build is.
The buildDefaults view is requireDefaultRecords() on each DataObject class, and hence has the potential to modify database state. It also lists all modified tables, allowing attackers more insight into which modules are used, and how the database tables are structured.

## Which versions are affected by GHSA-x5w2-wcr8-9q45?

6 open source packages ship an affected version, including silverstripe/framework.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `silverstripe/framework` | Packagist | All versions | 3.1.17 |
| `silverstripe/framework` | Packagist | All versions | 3.1.17 |
| `silverstripe/framework` | Packagist | From 3.2.0 | 3.2.2 |
| `silverstripe/framework` | Packagist | From 3.2.0 | 3.2.2 |
| `silverstripe/framework` | Packagist | From 3.3.0-beta1 | 3.3.0 |
| `silverstripe/framework` | Packagist | From 3.3.0-beta1 | 3.3.0 |

## How do I fix GHSA-x5w2-wcr8-9q45?

Upgrade silverstripe/framework to a fixed version for your release line: 3.1.17, 3.2.2 or 3.3.0.

## Is GHSA-x5w2-wcr8-9q45 being exploited?

There is no known exploitation of GHSA-x5w2-wcr8-9q45 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-x5w2-wcr8-9q45 and fix it if it is affected.

What it is: GHSA-x5w2-wcr8-9q45 is a missing authorization vulnerability in silverstripe/framework, published on 23 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-x5w2-wcr8-9q45 in the wild and no public exploit code.

Affected packages and fixed versions:
- silverstripe/framework (Packagist): affected all versions; fixed in 3.1.17
- silverstripe/framework (Packagist): affected all versions; fixed in 3.1.17
- silverstripe/framework (Packagist): affected from 3.2.0; fixed in 3.2.2
- silverstripe/framework (Packagist): affected from 3.2.0; fixed in 3.2.2
- silverstripe/framework (Packagist): affected from 3.3.0-beta1; fixed in 3.3.0
- silverstripe/framework (Packagist): affected from 3.3.0-beta1; fixed in 3.3.0

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-x5w2-wcr8-9q45/ (Markdown: https://insights.sbomify.com/GHSA-x5w2-wcr8-9q45/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-x5w2-wcr8-9q45

---
From sbomify Insights: https://insights.sbomify.com/GHSA-x5w2-wcr8-9q45/
Summaries are generated and may contain mistakes; the official description above is the record.
