# GHSA-7mw3-79jq-xc7f: aiograpi has dependency on vulnerable orjson 3.11.4 (CVE-2025-67221)

> aiograpi incorrectly pins a vulnerable orjson version, allowing denial of service via deeply nested JSON inputs.

- **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 2026

## What is GHSA-7mw3-79jq-xc7f?

GHSA-7mw3-79jq-xc7f is a vulnerability in aiograpi, published on 6 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

## Impact

aiograpi 0.6.6 / 0.7.0 / 0.7.1 declared `orjson==3.11.6` (and later `==3.11.8`) in `requirements.txt` but `setup.py` carried a hard-coded duplicate `requirements = [...]` list that was never updated and still pinned `orjson==3.11.4`.

When `setuptools` builds the source distribution it reads the metadata from `setup.py`, not from `requirements.txt`. So `pip install aiograpi==0.6.6` (or 0.7.0 / 0.7.1) actually pulls `orjson==3.11.4` — a version vulnerable to **CVE-2025-67221** (stack overflow in `orjson.dumps` on deeply nested JSON inputs).

## Practical exploitability

Low in the typical aiograpi flow: `orjson` is used to encode request bodies aiograpi itself constructs and to decode responses returned by Instagram. An attacker would need to coerce aiograpi to encode an attacker-controlled deeply-nested Python structure or to decode an attacker-supplied stream — not the normal call shape.

However any caller doing `client.public_request(...)` or similar with caller-controlled payloads, or any caller passing aiograpi-decoded `last_json` into recursive serialization, may hit the unbounded recursion. The patched orjson rejects deeply-nested inputs cleanly.

## Patches

Fixed in **aiograpi 0.7.2** by migrating to `pyproject.toml` (PEP 621) — single source of truth for dependencies. PyPI installs of 0.7.2 and later resolve `orjson==3.11.8` correctly.

## Workarounds

Force-install a non-vulnerable orjson alongside the affected aiograpi version:

```
pip install 'aiograpi==0.7.1' 'orjson>=3.11.6'
```

Or just upgrade to a fixed aiograpi:

```
pip install -U 'aiograpi>=0.7.2'
```

## Resources

- orjson CVE-2025-67221 advisory: https://github.com/ijl/orjson/security/advisories
- aiograpi 0.7.2 changelog (security section): https://github.com/subzeroid/aiograpi/blob/main/CHANGELOG.md#072--2026-04-27

## Which versions are affected by GHSA-7mw3-79jq-xc7f?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `aiograpi` | PyPI | From 0.6.6 | 0.7.2 |
| `aiograpi` | PyPI | From 0.6.6 | 0.7.2 |

## How do I fix GHSA-7mw3-79jq-xc7f?

Upgrade aiograpi to 0.7.2 or later.

## Is GHSA-7mw3-79jq-xc7f being exploited?

There is no known exploitation of GHSA-7mw3-79jq-xc7f in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-7mw3-79jq-xc7f and fix it if it is affected.

What it is: GHSA-7mw3-79jq-xc7f is a vulnerability in aiograpi, published on 6 May 2026. 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-7mw3-79jq-xc7f in the wild and no public exploit code.

Affected packages and fixed versions:
- aiograpi (PyPI): affected from 0.6.6; fixed in 0.7.2
- aiograpi (PyPI): affected from 0.6.6; fixed in 0.7.2

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-7mw3-79jq-xc7f/ (Markdown: https://insights.sbomify.com/GHSA-7mw3-79jq-xc7f/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-7mw3-79jq-xc7f

---
From sbomify Insights: https://insights.sbomify.com/GHSA-7mw3-79jq-xc7f/
Summaries are generated and may contain mistakes; the official description above is the record.
