GHSA-6jq6-x4cx-qvcm: Firefly II has Stored XSS in Audit Log Entry view via piggy bank name (ale.twig)
Summary The Twig template resources/views/list/ale.twig renders the piggy bank name from AuditLogEntry.after.piggy using the raw filter, bypassing Twig's auto-escaping. A piggy bank created with an HTML payload in its name executes arbitrary JavaScript in any browser viewing that transaction's audit log.
Published Jun 12, 2026
Affected packages
grumpydictator/firefly-iii
- Ecosystem
- Composer (PHP)
- Affected
- <= 6.6.2
- Fixed in
- 6.6.3
- Check
composer show grumpydictator/firefly-iii
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
The Twig template resources/views/list/ale.twig renders the piggy bank name from AuditLogEntry.after.piggy using the |raw filter, bypassing Twig's auto-escaping. A piggy bank created with an HTML payload in its name executes arbitrary JavaScript in any browser viewing that transaction's audit log.
Root Cause
The |raw filter is required on the outer trans() call to preserve ` tags in the amount parameter (currency styling). However, this also disables escaping for the user-controlled name` parameter.
Vulnerable code (`resources/views/list/ale.twig` lines 107, 110):
{{ trans('firefly.ale_action_log_add', {
amount: formatAmountBySymbol(...),
name: logEntry.after.piggy
})|raw }}No HTML sanitization at storage time — PiggyBankStoreRequest only validates min:1|max:255|uniquePiggyBankForUser.
Data Flow
POST /api/v1/piggy-banks {"name": ""}
→ Stored verbatim in piggy_banks.name
→ Transaction rule fires add_to_piggy / remove_from_piggy
→ UpdatePiggyBank::handle() stores AuditLogEntry.after.piggy = raw name
→ Any user views /transactions/show/{id}
→ ale.twig outputs unescaped payload → XSS firesCSP Note
The nonce-based CSP (script-src 'nonce-...' 'strict-dynamic') does not prevent this attack. Inline event handlers (onerror, onload) in HTML attributes are governed by script-src-attr, which is unrestricted in the current policy. The `` payload bypasses the nonce requirement entirely.
PoC
- Authenticate as any user
POST /api/v1/piggy-bankswith"name": ""- Create a rule: action = "Add money to piggy bank [attacker's piggy bank]"
- Trigger the rule on any transaction
- Visit
/transactions/show/{id}→ payload fires
Confirmed server response (v6.6.2):
Added EUR 50.00 to piggy bank
""Impact
- Stored XSS persists in DB — fires for every user who views the transaction
- Cookie theft → session hijacking
- In multi-user setups: one user attacks another user or admin
- Chainable with CSRF-like operations
Fix
PR #12271 (merged into develop): add |e to escape only the user-controlled name parameter.
{{ trans('firefly.ale_action_log_add', {
amount: formatAmountBySymbol(...),
name: logEntry.after.piggy|e
})|raw }}Credited to iaohkut-from-NightWolf-Team.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-50886
Project Firefly III has incorrect access control in the webhook management component
critical9.1No fixJun 15, 2026GHSA-5q8v-j673-m5v4
Firefly III user API endpoints expose all users' information to any authenticated user (IDOR)
medium5.7Mar 7, 2026CVE-2024-37893
Firefly III has a MFA bypass in oauth flow
medium5.9Jun 17, 2024GHSA-29w6-c52g-m8jc
C5 Firefly III CSV Injection.
medium4.0Jan 31, 2024CVE-2024-22075
Firefly III allows webhooks HTML Injection.
medium6.5Jan 5, 2024
