# GHSA-j9q2-f9q7-jhgq: CakePHP SecurityComponent cross form submission issue

> Attackers can submit forms to unauthorized actions, potentially causing mass assignment issues in CakePHP applications using SecurityComponent.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 20 Jan 2023

## What is GHSA-j9q2-f9q7-jhgq?

GHSA-j9q2-f9q7-jhgq is a missing authorization vulnerability in cakephp/cakephp, published on 20 Jan 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

Prior to versions 2.4.8 and 1.3.18, forms secured by SecurityComponent could be submitted to any action without triggering SecurityComponent’s tampering protection. If an application contained multiple POST forms to manipulate the same models, it could be vulnerable to mass assignment issues.

## Which versions are affected by GHSA-j9q2-f9q7-jhgq?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `cakephp/cakephp` | Packagist | From 1.3.0 | 1.3.18 |
| `cakephp/cakephp` | Packagist | From 1.3.0 | 1.3.18 |
| `cakephp/cakephp` | Packagist | From 2.0.0 | 2.4.8 |
| `cakephp/cakephp` | Packagist | From 2.0.0 | 2.4.8 |

## How do I fix GHSA-j9q2-f9q7-jhgq?

Upgrade cakephp/cakephp to a fixed version for your release line: 1.3.18 or 2.4.8.

## Is GHSA-j9q2-f9q7-jhgq being exploited?

There is no known exploitation of GHSA-j9q2-f9q7-jhgq in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-j9q2-f9q7-jhgq and fix it if it is affected.

What it is: GHSA-j9q2-f9q7-jhgq is a missing authorization vulnerability in cakephp/cakephp, published on 20 Jan 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-j9q2-f9q7-jhgq in the wild and no public exploit code.

Affected packages and fixed versions:
- cakephp/cakephp (Packagist): affected from 1.3.0; fixed in 1.3.18
- cakephp/cakephp (Packagist): affected from 1.3.0; fixed in 1.3.18
- cakephp/cakephp (Packagist): affected from 2.0.0; fixed in 2.4.8
- cakephp/cakephp (Packagist): affected from 2.0.0; fixed in 2.4.8

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-j9q2-f9q7-jhgq/ (Markdown: https://insights.sbomify.com/GHSA-j9q2-f9q7-jhgq/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-j9q2-f9q7-jhgq

---
From sbomify Insights: https://insights.sbomify.com/GHSA-j9q2-f9q7-jhgq/
Summaries are generated and may contain mistakes; the official description above is the record.
