# GHSA-ggxf-37hm-9wqf: instagrapi: Unsafe signup challenge path handling in instagrapi

> Attacker can force the library to send requests with session headers to arbitrary hosts via malicious challenge paths, potentially leaking data or bypassing controls.

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

## What is GHSA-ggxf-37hm-9wqf?

GHSA-ggxf-37hm-9wqf is a server-side request forgery vulnerability in instagrapi, published on 23 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

instagrapi versions before 2.6.9 accepted server-supplied signup challenge paths and used them to build request URLs before validating that the paths were relative Instagram API paths. A malicious or tampered challenge payload could cause challenge handling requests to be sent outside the intended Instagram host with the client\'s existing session headers. Version 2.6.9 validates challenge paths before building URLs, solving captcha challenges, or submitting phone/SMS challenge forms.

## Which versions are affected by GHSA-ggxf-37hm-9wqf?

2 open source packages ship an affected version, including instagrapi.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `instagrapi` | PyPI | All versions | 2.6.9 |
| `instagrapi` | PyPI | All versions | 2.6.9 |

## How do I fix GHSA-ggxf-37hm-9wqf?

Upgrade instagrapi to 2.6.9 or later.

## Is GHSA-ggxf-37hm-9wqf being exploited?

There is no known exploitation of GHSA-ggxf-37hm-9wqf in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-ggxf-37hm-9wqf and fix it if it is affected.

What it is: GHSA-ggxf-37hm-9wqf is a server-side request forgery vulnerability in instagrapi, published on 23 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-ggxf-37hm-9wqf in the wild and no public exploit code.

Affected packages and fixed versions:
- instagrapi (PyPI): affected all versions; fixed in 2.6.9
- instagrapi (PyPI): affected all versions; fixed in 2.6.9

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-ggxf-37hm-9wqf/ (Markdown: https://insights.sbomify.com/GHSA-ggxf-37hm-9wqf/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-ggxf-37hm-9wqf

---
From sbomify Insights: https://insights.sbomify.com/GHSA-ggxf-37hm-9wqf/
Summaries are generated and may contain mistakes; the official description above is the record.
