Vulnérabilité dans swoosh (CVE-2026-54893)
Résumé
Vulnérabilité dans swoosh (CVE-2026-54893). Risque d'opérations non autorisées ou de divulgation. Exploitable via Swoosh.Adapters.MsGraph. Atténuation : mise à jour vers 1.26.3 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
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…
Source: NIST National Vulnerability Database NVD GitHub Advisory
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2026-54893 a été découverte dans swoosh.
Des attaquants peuvent cibler un point d'entrée spécifique comme Swoosh.Adapters.MsGraph à distance pour détourner le produit.
Risque d'opérations non autorisées ou de divulgation.
Action : mettez à jour swoosh vers 1.26.3 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « swoosh CVE-2026-54893 » sur le site de l'éditeur.
CVE-2026-54893 (swoosh) — CWE-116
Surface d'attaque : Swoosh.Adapters.MsGraph / from / POST
Correctif : 1.26.3 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une vulnérabilité (CWE-116) affecte swoosh. Les attaquants atteignent le code vulnérable via Swoosh.Adapters.MsGraph.
Consultez l'avis de l'éditeur pour les versions affectées de swoosh. Surface d'attaque : Swoosh.Adapters.MsGraph / from / POST.
Gravité : ?. Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 1.26.3.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'swoosh' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
swooshを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade swoosh to 1.26.3ステージング環境で 1.26.3 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- advisory nvd.nist.gov
- package github.com
- web cna.erlef.org
- web github.com
- web github.com
- web osv.dev
- web github.com
- web github.com