
Loading

Loading
We use strictly necessary cookies to run this site, and analytics cookies to understand how it's used. See our Privacy Policy for details.
A GitHub-reviewed security advisory, not necessarily under active exploitation the way our CISA KEV advisories are, but a real, disclosed vulnerability in an open-source dependency.
Affected packages
Vulnerable: >= 1.12.0, < 1.26.3
Patched in 1.26.3
Details
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.
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.
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).from address whose local part contains URL-special characters, for example one using /, ?, or # to escape the /users/{from}/sendMail path segment.POST to the attacker-rewritten path and query string.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.
EPSS, exploit probability
Low0.20%
estimated chance of real-world exploitation in the next 30 days, higher than 9.6% of every CVE FIRST.org scores
Refreshed 10/16/2026, via FIRST.org's EPSS model, not CVSS, this measures likelihood of exploitation, not how severe it would be.
Talk to us about this
Find out whether this dependency (or others like it) is actually reachable in your codebase.
Get help patching, or building dependency-scanning into your pipeline going forward.
A secure code review or supply chain review finds this before an advisory does.