Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
💧 Hex
Not in CISA KEV

CVE-2026-54893 — swoosh

Fix: swoosh/swoosh@23bfcda

CVE-2026-54893 is a CWE-116 vulnerability in swoosh. A fix is available for swoosh — see the affected versions and patch details below.

Email-derived URL path injection in the Swoosh Microsoft Graph adapter

Also known asEEF-CVE-2026-54893GHSA-754j-98wh-57rf
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Oct 23, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

No confirmed exploitation observed yet

  • CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-54893.

EPSS Exploitation Probability

via FIRST.org ↗
0.2%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs10th percentile — riskier than 10% of all scored CVEsHighest risk
0.00%0.23%0.47%0.70%0.1%0.2%0.2%0.2%Aug 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
💧swoosh

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Hex packages — download data is not available via public APIs for these ecosystems.

Description

Summary

Swoosh.Adapters.MsGraph builds its Microsoft Graph API request URL by interpolating the sender's email address directly into the URL path (/users/{from}/sendMail) without percent-encoding or validation. In applications that derive the from address from untrusted or user-influenced input (a relay, a contact form, or a "send as" feature), an attacker can inject URL-special characters into the local part of the address to escape the intended path segment and rewrite the request's path and query string. Because the rewritten request is still sent as the application's authenticated POST with its Microsoft Graph bearer token, the attacker can redirect it to other Graph endpoints within the token's scopes.

Details

The flaw is in lib/swoosh/adapters/ms_graph.ex. api_endpoint_url/2 constructs the Graph endpoint by interpolating the email's from address into the path /users/{from}/sendMail. The from value is taken verbatim from the email struct and is neither percent-encoded nor validated against the RFC 5321 character set before being placed into the URL. deliver/2 then issues an authenticated POST to that constructed URL using the application's Graph bearer token.

Because the address sits as the local part of /users/{from}/sendMail, characters such as /, ?, and # are not neutralized. A / lets the attacker append or replace additional path segments, a ? starts an attacker-controlled query string, and # truncates the remainder of the intended path. The result is that the authenticated request can be steered to a different Graph endpoint or carry attacker-chosen query parameters, all under the token's existing scopes. Applications that always send with a fixed, trusted from address never reach the injectable path and are unaffected.

PoC

  1. Configure an application to use Swoosh.Adapters.MsGraph and derive the email from address from user-influenced input (e.g. a contact form's reply address or a "send as" field).
  2. Submit a from address whose local part contains URL-special characters, for example one using /, ?, or # to escape the /users/{from}/sendMail path segment.
  3. Trigger delivery; Swoosh interpolates the address unencoded and sends the application's authenticated Graph POST to the attacker-rewritten path and query string.

Impact

An attacker who can influence the sender address can redirect an application's authenticated Microsoft Graph requests to other endpoints within the bearer token's scopes and control the request's query string, turning the mail-sending path into a constrained server-side request forgery against the Graph API.

References

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
💧Hexswoosh≥ 1.12.0&&< 1.26.31.26.3mix deps.update swoosh

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for swoosh, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update swoosh to 1.26.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-54893 is resolved across your whole dependency graph.

  3. Workarounds

    Restrict outbound requests from the affected component to an allowlist of hosts, block access to link-local and internal address ranges at the network layer, and require authentication on internal services so a forged request cannot reach them unauthenticated.

Frequently Asked Questions

### Summary `Swoosh.Adapters.MsGraph` builds its Microsoft Graph API request URL by interpolating the sender's email address directly into the URL path (`/users/{from}/sendMail`) without percent-encoding or validation. In applications that derive the `from` address from untrusted or user-influenced input (a relay, a contact form, or a "send as" feature), an attacker can inject URL-special characters into the local part of the address to escape the intended path segment and rewrite the request's path and query string. Because the rewritten request is still sent as the application's authenticat
O3 Security · Impact-Aware SCA

Is CVE-2026-54893 in your dependencies?

Find it across Hex, including transitive dependencies.

CVE-2026-54893: swoosh SSRF — Fixed in 1.26.3