# GHSA-3mm9-2p44-rw39: Silverstripe SiteTree Creation Permission Vulnerability

> Unauthenticated users can create new SiteTree objects in the database due to missing permission validation in the default configuration.

- **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:** 22 May 2024

## What is GHSA-3mm9-2p44-rw39?

GHSA-3mm9-2p44-rw39 is a missing authorization vulnerability in silverstripe/cms, published on 22 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A vulnerability exists in the permission validation for SiteTree object creation. By default user permissions are not validated by the SiteTree::canCreate method, unless overridden by user code or via the configuration system.

This vulnerability will allow users, or unauthenticated guests, to create new SiteTree objects in the database. This vulnerability is present when such users are given CMS access via other means, or if there is another mechanism (such as RestfulServer module) which allows model editing and relies on model-level permission checks.

This vulnerability is restricted to the creation of draft or live pages, and does not allow users to edit, publish, or unpublish existing pages.

All users should upgrade as soon as possible.

## Which versions are affected by GHSA-3mm9-2p44-rw39?

4 open source packages ship an affected version, including silverstripe/cms.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `silverstripe/cms` | Packagist | From 3.0.0 | 3.0.12 |
| `silverstripe/cms` | Packagist | From 3.0.0 | 3.0.12 |
| `silverstripe/cms` | Packagist | From 3.1.0 | 3.1.11 |
| `silverstripe/cms` | Packagist | From 3.1.0 | 3.1.11 |

## How do I fix GHSA-3mm9-2p44-rw39?

Upgrade silverstripe/cms to a fixed version for your release line: 3.0.12 or 3.1.11.

## Is GHSA-3mm9-2p44-rw39 being exploited?

There is no known exploitation of GHSA-3mm9-2p44-rw39 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-3mm9-2p44-rw39 and fix it if it is affected.

What it is: GHSA-3mm9-2p44-rw39 is a missing authorization vulnerability in silverstripe/cms, published on 22 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-3mm9-2p44-rw39 in the wild and no public exploit code.

Affected packages and fixed versions:
- silverstripe/cms (Packagist): affected from 3.0.0; fixed in 3.0.12
- silverstripe/cms (Packagist): affected from 3.0.0; fixed in 3.0.12
- silverstripe/cms (Packagist): affected from 3.1.0; fixed in 3.1.11
- silverstripe/cms (Packagist): affected from 3.1.0; fixed in 3.1.11

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-3mm9-2p44-rw39/ (Markdown: https://insights.sbomify.com/GHSA-3mm9-2p44-rw39/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-3mm9-2p44-rw39

---
From sbomify Insights: https://insights.sbomify.com/GHSA-3mm9-2p44-rw39/
Summaries are generated and may contain mistakes; the official description above is the record.
