⚠️

سلب مسئولیت و اخلاق حرفه‌ای

این مطالب صرفاً برای اهداف آموزشی، پژوهشی و افزایش آگاهی امنیتی ارائه شده‌اند. هرگونه استفاده غیرمجاز، غیرقانونی یا سوءاستفاده از اطلاعات، ابزارها و روش‌های مطرح‌شده، کاملاً بر عهده مخاطب است. نویسنده و منتشرکننده هیچ مسئولیتی در قبال خسارات، آسیب‌ها یا پیامدهای ناشی از استفاده نادرست از این مطالب نخواهند داشت.

CVE-2026-145257: HTML Injection in Mealie Group Invitations Enables Instance-Branded Phishing | Alireza Bolbolabadi - Red Team Security
LOADING

CVE-2026-145257: HTML Injection in Mealie Group Invitations Enables Instance-Branded Phishing

Executive summary

CVE-2026-145257 describes an HTML injection defect in Mealie, the self-hosted recipe management application. The vulnerability lives in the server-rendered template for group invitation emails, where the invitation token is interpolated into an anchor href attribute without escaping characters that are structurally meaningful in HTML. An authenticated user that already holds the GROUP_INVITE permission can submit a token containing a double quote (") to the API endpoint POST /api/households/invitations/email. The quote terminates the attribute early, allowing attacker-supplied markup to be interpreted by the recipient mail client and replacing the legitimate invitation link with a destination of the attacker's choice.

Because the resulting message is delivered from the same Mealie instance, the phishing link inherits the visual branding and sender trust of the legitimate invitation flow. Mealie 3.31.0 closes the issue by validating or escaping the token character set, and any deployment at that version or later is not affected.

Affected systems

  • Product: Mealie (self-hosted recipe management)

  • Vulnerable versions: All releases before 3.31.0

  • Fixed in: 3.31.0 and later

  • Vulnerable component: Group invitation email rendering, exposed via the API endpoint POST /api/households/invitations/email

  • Required privilege: An authenticated user account holding the GROUP_INVITE permission in the target household

The defect is in server-rendered email content rather than in a publicly reachable web view, which is why only authenticated, authorised accounts can exercise it. Anonymous and low-privilege users cannot reach the vulnerable code path directly.

Root cause and exploitation path

The template responsible for outbound invitation emails builds an anchor element whose href attribute embeds the supplied invitation token. Token characters that have structural meaning in HTML — in particular the double quote — are not escaped or otherwise constrained during interpolation.

The exploitation path, as described by the advisory, is:

  1. An authenticated user with GROUP_INVITE crafts a token containing a literal double-quote character.

  1. The token is submitted to POST /api/households/invitations/email.

  1. The backend interpolates the token into the href attribute. The injected quote ends the attribute prematurely.

  1. The remainder of the token is rendered as additional markup by the recipient's mail client.

  1. The legitimate invitation URL is replaced with an attacker-controlled URL while the surrounding branding still points at the original Mealie instance.

The advisory explicitly identifies the double quote as the breaking character. It does not enumerate other attribute-breaking characters that may or may not also be unvalidated, and the supplied context does not support further claims about the full character set accepted without sanitisation.

Real-world impact and threat activity

The practical impact is bounded by the precondition that the attacker must already hold GROUP_INVITE in the target household. That places the realistic threat model in two camps:

  • A trusted insider with invite rights who pivots to phishing other household members.

  • A compromised low-privilege administrator account whose permissions are broad enough to include group invitations.

The provided context records no public exploit code, no in-the-wild exploitation, and no known-exploited state for CVE-2026-145257. The accompanying CVSS of 4.1 sits in the medium-low band, consistent with authentication, permission, and user-interaction requirements. There is no indication in the supplied material of server-side code execution, credential theft at the application layer, or cross-tenant data access; the demonstrated effect is redirecting an outbound link to a destination of the attacker's choosing.

Detection of past abuse would require inspecting outbound invitation email logs or relying on recipient reports of suspicious links. Neither capability is addressed in the supplied advisory.

Mitigation

  1. Patch — Upgrade Mealie to 3.31.0 or any later release. The advisory treats 3.31.0 as the version that closes the injection by validating or escaping the token character set; for organisations on older releases, this upgrade is the primary control.

  1. Permission hardening — Until the patch can be deployed, audit GROUP_INVITE membership and revoke it from any account that does not strictly require it. Reducing the population of accounts that meet the precondition shrinks the realistic attacker pool to near zero.

  1. Email review — Have administrators and targeted household members scrutinise any Mealie household invitation email for unexpected domains in embedded links, particularly where the visible anchor text and the underlying href appear inconsistent. This is a detection-and-response control, not a fix.

  1. No vendor workaround documented — The supplied context does not describe a configuration option, regex filter, or proxy rule that substitutes for the patch. Any non-upgrade mitigation would amount to guesswork relative to the validation logic in 3.31.0 and is not endorsed here.

منابع

·
← اخبار