# CVE-2024-53983: Server-side request forgery in Backstage Scaffolder plugin

> Attackers can exploit Server-Side Template Injection to capture privileged git tokens, enabling unauthorized access to sensitive git resources.

- **Severity:** Medium 5.4 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 29 Nov 2024
- **Updated:** 2 Dec 2024
- **Also known as:** GHSA-qmc2-jpr5-7rg9

## What is CVE-2024-53983?

CVE-2024-53983 is a medium-severity server-side request forgery vulnerability in backstage, published on 29 Nov 2024. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

The Backstage Scaffolder plugin Houses types and utilities for building scaffolder-related modules. A vulnerability is identified in Backstage Scaffolder template functionality where Server-Side Template Injection (SSTI) can be exploited to perform Git config injection. The vulnerability allows an attacker to capture privileged git tokens used by the Backstage Scaffolder plugin. With these tokens, unauthorized access to sensitive resources in git can be achieved. The impact is considered medium severity as the Backstage Threat Model recommends restricting access to adding and editing templates in the Backstage Catalog plugin. The issue has been resolved in versions `v0.4.12`, `v0.5.1` and `v0.6.1` of the `@backstage/plugin-scaffolder-node` package. Users are encouraged to upgrade to this version to mitigate the vulnerability. Users are advised to upgrade. Users unable to upgrade may ensure that templates do not change git config.

Weakness: CWE-918 (Server-Side Request Forgery)

## Which versions are affected by CVE-2024-53983?

6 open source packages ship an affected version, including @backstage/plugin-scaffolder-node.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@backstage/plugin-scaffolder-node` | npm | All versions | 0.4.12 |
| `@backstage/plugin-scaffolder-node` | npm | All versions | 0.4.12 |
| `@backstage/plugin-scaffolder-node` | npm | From 0.5.0 | 0.5.1 |
| `@backstage/plugin-scaffolder-node` | npm | From 0.5.0 | 0.5.1 |
| `@backstage/plugin-scaffolder-node` | npm | From 0.6.0 | 0.6.1 |
| `@backstage/plugin-scaffolder-node` | npm | From 0.6.0 | 0.6.1 |

## How do I fix CVE-2024-53983?

Upgrade @backstage/plugin-scaffolder-node to a fixed version for your release line: 0.4.12, 0.5.1 or 0.6.1.

## Is CVE-2024-53983 being exploited?

There is no known exploitation of CVE-2024-53983 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-53983 and fix it if it is affected.

What it is: CVE-2024-53983 is a medium-severity server-side request forgery vulnerability in backstage, published on 29 Nov 2024. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2024-53983 in the wild and no public exploit code.

Affected packages and fixed versions:
- @backstage/plugin-scaffolder-node (npm): affected all versions; fixed in 0.4.12
- @backstage/plugin-scaffolder-node (npm): affected all versions; fixed in 0.4.12
- @backstage/plugin-scaffolder-node (npm): affected from 0.5.0; fixed in 0.5.1
- @backstage/plugin-scaffolder-node (npm): affected from 0.5.0; fixed in 0.5.1
- @backstage/plugin-scaffolder-node (npm): affected from 0.6.0; fixed in 0.6.1
- @backstage/plugin-scaffolder-node (npm): affected from 0.6.0; fixed in 0.6.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/CVE-2024-53983/ (Markdown: https://insights.sbomify.com/CVE-2024-53983/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-53983
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-53983
- OSV: https://osv.dev/vulnerability/CVE-2024-53983

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-53983/
Summaries are generated and may contain mistakes; the official description above is the record.
