# GHSA-jqx4-9gpq-rppm: @misskey-dev/summaly allows IP Filter Bypass via Redirect

> An attacker can bypass IP filtering via HTTP redirects to access internal network services and extract sensitive information.

- **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:** 6 May 2025

## What is GHSA-jqx4-9gpq-rppm?

GHSA-jqx4-9gpq-rppm is a server-side request forgery vulnerability in @misskey-dev/summaly, published on 6 May 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Summary
Due to a validation error in `got.scpaping`, it is possible to use an HTTP redirect to avoid IP filtering.

### Details
In `got.scpaping`, Summaly first makes a HTTP `HEAD` request to the page being summarized. It then preforms private IP address checks on the `HEAD` response, then makes an additional HTTP `GET` request to the page being summarized. Unfortunately, since private IP address checks aren't performed on the `GET` response, the `GET` response can issue a HTTP redirect to a private IP address, which will succeed, regardless of if private IP addresses are allowed by Summaly.

### PoC
With a simple Caddy webserver, you can get Summaly to summarize a page hosted via a local IP address:
```caddy
@summaly-bypass-head {
    method HEAD
    path /summaly-bypass
}
@summaly-bypass-get {
    method GET
    path /summaly-bypass
}
header @summaly-bypass-head Content-Type "text/html"
respond @summaly-bypass-head 200
redir @summaly-bypass-get http://127.0.0.1:3080/
```

### Impact
Using this bypass, an attacker can probe a victims internal network for HTTP services that aren't supposed to be exposed to the outside world. While they might only have read-only access through this, it may still be possible to extract sensitive information or be used to probe a network prior to attacking via other exploits without leaving a trace.

## Which versions are affected by GHSA-jqx4-9gpq-rppm?

2 open source packages ship an affected version, including @misskey-dev/summaly.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@misskey-dev/summaly` | npm | From 5.1.0 | 5.2.1 |
| `@misskey-dev/summaly` | npm | From 5.1.0 | 5.2.1 |

## How do I fix GHSA-jqx4-9gpq-rppm?

Upgrade @misskey-dev/summaly to 5.2.1 or later.

## Is GHSA-jqx4-9gpq-rppm being exploited?

There is no known exploitation of GHSA-jqx4-9gpq-rppm in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-jqx4-9gpq-rppm and fix it if it is affected.

What it is: GHSA-jqx4-9gpq-rppm is a server-side request forgery vulnerability in @misskey-dev/summaly, published on 6 May 2025. 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-jqx4-9gpq-rppm in the wild and no public exploit code.

Affected packages and fixed versions:
- @misskey-dev/summaly (npm): affected from 5.1.0; fixed in 5.2.1
- @misskey-dev/summaly (npm): affected from 5.1.0; fixed in 5.2.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-jqx4-9gpq-rppm/ (Markdown: https://insights.sbomify.com/GHSA-jqx4-9gpq-rppm/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-jqx4-9gpq-rppm

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