{"answers":{"affected":"2 open source packages ship an affected version, including rembg.","exploited":"There is no known exploitation of GHSA-55v6-g8pm-pw4c in the wild and no public exploit code.","fix":"Upgrade rembg to 2.0.75 or later.","what":"GHSA-55v6-g8pm-pw4c is a server-side request forgery vulnerability in rembg, published on 10 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-55v6-g8pm-pw4c and fix it if it is affected.\n\nWhat it is: GHSA-55v6-g8pm-pw4c is a server-side request forgery vulnerability in rembg, published on 10 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-55v6-g8pm-pw4c in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- rembg (PyPI): affected all versions; fixed in 2.0.75\n- rembg (PyPI): affected all versions; fixed in 2.0.75\n\nTask:\n1. 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.\n2. 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.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-55v6-g8pm-pw4c/ (Markdown: https://insights.sbomify.com/GHSA-55v6-g8pm-pw4c/index.md)","id":"GHSA-55v6-g8pm-pw4c","markdown":"https://insights.sbomify.com/GHSA-55v6-g8pm-pw4c/index.md","name":"GHSA-55v6-g8pm-pw4c","record":{"aliases":[],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["data_read","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"rembg background removal","requires_auth":"none","summary":"An unauthenticated attacker can exploit SSRF in rembg to access internal network resources and view image responses via the API.","user_interaction":"not_required","vuln_class":"ssrf"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"# GitHub Security Lab (GHSL) Vulnerability Report, rembg: `GHSL-2024-161`, `GHSL-2024-162`\n\nThe [GitHub Security Lab](https://securitylab.github.com) team has identified potential security vulnerabilities in [rembg](https://github.com/danielgatis/rembg).\n\nWe are committed to working with you to help resolve these issues. In this report you will find everything you need to effectively coordinate a resolution of these issues with the GHSL team.\n\nIf at any point you have concerns or questions about this process, please do not hesitate to reach out to us at `securitylab@github.com` (please include `GHSL-2024-161` or `GHSL-2024-162` as a reference). See also [this blog post](https://github.blog/2022-04-22-removing-the-stigma-of-a-cve/) written by GitHub's Advisory Curation team which explains what CVEs and advisories are, why they are important to track vulnerabilities and keep downstream users informed, the CVE assigning process, and how they are used to keep open source software secure.\n\nIf you are _NOT_ the correct point of contact for this report, please let us know!\n\n## Summary\n\nrembg server is vulnerable to Server-Side Request Forgery (SSRF) and a weak default CORS configuration, which may allow an attacker website to send requests to servers on the internal network and view image responses.\n\n## Project\n\nrembg\n\n## Tested Version\n\n[v2.0.57](https://github.com/danielgatis/rembg/releases/tag/v2.0.57)\n\n## Details\n\n### Issue 1: SSRF via `/api/remove` (`GHSL-2024-161`)\n\nThe [`/api/remove`](https://github.com/danielgatis/rembg/blob/d1e00734f8a996abf512a3a5c251c7a9a392c90a/rembg/commands/s_command.py#L237) endpoint takes a URL query parameter that allows an image to be fetched, processed and returned. An attacker may  be able to query this endpoint to view pictures hosted on the internal network of the rembg server.\n\n```python\n async def get_index(\n        url: str = Query(\n            default=..., description=\"URL of the image that has to be processed.\"\n        ),\n        commons: CommonQueryParams = Depends(),\n    ):\n        async with aiohttp.ClientSession() as session:\n            async with session.get(url) as response:\n                file = await response.read()\n                return await asyncify(im_without_bg)(file, commons)\n```\n\n#### Impact\n\nThis issue may lead to `Information Disclosure`.\n\n#### Remediation\n\nEnsure that the IP address specified is not a local address. If resolving a domain name, ensure that the resolved IP address is not local.\n\n#### Proof of Concept\n\n`curl -s \"http://localhost:7000/api/remove?url=http://0.0.0.0/secret.png\" -o output.png`\n\n### Issue 2: CORS misconfiguration (`GHSL-2024-162`)\n\nThe following [CORS middleware](https://github.com/danielgatis/rembg/blob/d1e00734f8a996abf512a3a5c251c7a9a392c90a/rembg/commands/s_command.py#L93) is setup incorrectly. All origins are reflected, which allows any website to send cross site requests to the rembg server and thus query any API. Even if authentication were to be enabled, `allow_credentials` is set to True, which would allow any website to send authenticated cross site requests.\n\n```python\n    app.add_middleware(\n        CORSMiddleware,\n        allow_credentials=True,\n        allow_origins=[\"*\"],\n        allow_methods=[\"*\"],\n        allow_headers=[\"*\"],\n    )\n\n```\n\n#### Impact\n\nThis issue may increase the severity of other vulnerabilities.\n\n#### Remediation\n\nCreate an allowlist of specific endpoints that can send cross site requests to the rembg server.\n\n#### Proof of Concept\n\nAn attacker website can host the following code:\n```javascript\nconst response = await fetch(\"http://localhost:7000/api/remove?url=https://0.0.0.0/secret.jpg\");\n```\nIf a victim running rembg server were to access the attacker website, the attacker website could read the file `secret.jpg` from the server hosted on the victim's internal network.\n\n## GitHub Security Advisories\n\nWe recommend you create a private [GitHub Security Advisory](https://help.github.com/en/github/managing-security-vulnerabilities/creating-a-security-advisory) for these findings. This also allows you to invite the GHSL team to collaborate and further discuss these findings in private before they are [published](https://help.github.com/en/github/managing-security-vulnerabilities/publishing-a-security-advisory).\n\n## Credit\n\nThese issues were discovered and reported by GHSL team member [@Kwstubbs (Kevin Stubbings)](https://github.com/Kwstubbs).\n\n## Contact\n\nYou can contact the GHSL team at `securitylab@github.com`, please include a reference to `GHSL-2024-161` or `GHSL-2024-162` in any communication regarding these issues.\n\n## Disclosure Policy\n\nThis report is subject to a 90-day disclosure deadline, as described in more detail in our [coordinated disclosure policy](https://securitylab.github.com/advisories#policy).","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"rembg server is vulnerable to Server-Side Request Forgery (SSRF) and a weak default CORS configuration","id":"GHSA-55v6-g8pm-pw4c","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"ssrf","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["2.0.75"],"introduced":["0"],"last_affected":[],"package":"rembg","purl":null,"source":"GHSA-55v6-g8pm-pw4c"},{"ecosystem":"PyPI","fixed":["2.0.75"],"introduced":["0"],"last_affected":[],"package":"rembg","purl":"pkg:pypi/rembg","source":"GHSA-55v6-g8pm-pw4c"}],"products":null,"published":"2026-04-10","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An unauthenticated attacker can exploit SSRF in rembg to access internal network resources and view image responses via the API.","url":"https://insights.sbomify.com/GHSA-55v6-g8pm-pw4c/"}