Vulnerabilities in pkg:pypi/instagrapi

PACKAGE
Advisory Summary

GHSA-ggxf-37hm-9wqf is a MODERATE (CVSS 6.5) unsafe signup challenge path handling vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting instagrapi libraries in the PyPI ecosystem. The issue involves unsafe signup challenge path handling in instagrapi. Remediation is available by upgrading affected packages to version 2.6.9.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/instagrapi

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/instagrapi. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-ggxf-37hm-9wqf - MODERATE instagrapi: Unsafe signup challenge path handling in instagrapi

GHSA-ggxf-37hm-9wqf at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-ggxf-37hm-9wqf
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product instagrapi
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Adjacent (AV:A)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix GHSA-ggxf-37hm-9wqf

To remediate this vulnerability, upgrade all affected instagrapi dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

instagrapi fixed: 2.6.9
pip install instagrapi>=2.6.9
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show instagrapi

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-ggxf-37hm-9wqf, inspect your installed packages using pip:

pip show instagrapi

Analyze the terminal output to locate any version of instagrapi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.6.9), your application is affected.

Note: The pip show instagrapi command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In instagrapi, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

GHSA-ggxf-37hm-9wqf Affected instagrapi Versions

1 component(s)
Fixed Versions:
2.6.9
Product / Package Ecosystem Affected Versions Fixed Version
instagrapi
PyPI
< 2.6.9
2.6.9

References

Frequently Asked Questions

What is GHSA-ggxf-37hm-9wqf?
GHSA-ggxf-37hm-9wqf is a security vulnerability in instagrapi involving Unsafe signup challenge path handling in instagrapi under CWE-918: Server-Side Request Forgery (SSRF).
Which instagrapi versions are affected?
Affected versions include releases prior to 2.6.9 across affected packages: instagrapi.
What version fixes GHSA-ggxf-37hm-9wqf?
Upgrading to 2.6.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is instagrapi affected?
Yes, instagrapi is affected in releases prior to 2.6.9. Upgrade your dependency to 2.6.9 or later.
What is the CVSS score of GHSA-ggxf-37hm-9wqf?
GHSA-ggxf-37hm-9wqf has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with GHSA-ggxf-37hm-9wqf?
GHSA-ggxf-37hm-9wqf is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check PyPI dependencies for GHSA-ggxf-37hm-9wqf?
Run the dependency tree command: 'pip show instagrapi'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-ggxf-37hm-9wqf",
  "modified" : "2026-05-23T00:12:34Z",
  "published" : "2026-05-23T00:12:34Z",
  "aliases" : [ ],
  "summary" : "instagrapi: Unsafe signup challenge path handling in instagrapi",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "instagrapi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.6.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/subzeroid/instagrapi/security/advisories/GHSA-ggxf-37hm-9wqf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/subzeroid/instagrapi"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-23T00:12:34Z",
    "nvd_published_at" : null
  }
}