GHSA-QRFH-CC86-VC8C

Vulnerability from github – Published: 2026-03-05 18:05 – Updated: 2026-03-05 18:05
VLAI
Summary
Leantime has HTML injection through firstname and lastname fields
Details

Summary

Leantime v2.3.27 is vulnerable to Stored HTML Injection. The firstname and lastname fields in the admin user edit page are rendered without HTML escaping, allowing an authenticated user to inject arbitrary HTML that executes when the profile is viewed.

Vulnerable File

app/Domain/Users/Templates/editUser.tpl.php

Vulnerable Code (Lines ~14-17)

value="<?php echo $values['firstname'] ?>"
value="<?php echo $values['lastname'] ?>"

These fields output raw user input without sanitization.

Steps to Reproduce

  1. Login as admin > Go to Settings > Users > Edit any user
  2. Enter HTML payload in First Name or Last Name field: <h1>INJECTED</h1>
  3. Save the user profile
  4. Create or view an article — the injected HTML renders in the author name

Fix

Replace unescaped echo with htmlspecialchars():

value="<?php echo htmlspecialchars($values['firstname'], ENT_QUOTES, 'UTF-8') ?>"
value="<?php echo htmlspecialchars($values['lastname'], ENT_QUOTES, 'UTF-8') ?>"

Or use the existing $this->e() helper already used in editOwn.tpl.php.

Impact

  • Stored HTML injection visible to all users viewing affected content
  • Can be used for phishing, fake login forms, and UI defacement
  • Affects all versions before 3.3.0
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Packagist",
        "name": "leantime/leantime"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.3.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-05T18:05:57Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "### Summary\nLeantime v2.3.27 is vulnerable to Stored HTML Injection. The `firstname` and `lastname` fields in the admin user edit page are rendered without  HTML escaping, allowing an authenticated user to inject arbitrary HTML that executes when the profile is viewed.\n\n### Vulnerable File\n`app/Domain/Users/Templates/editUser.tpl.php`\n\n### Vulnerable Code (Lines ~14-17)\n```php\nvalue=\"\u003c?php echo $values[\u0027firstname\u0027] ?\u003e\"\nvalue=\"\u003c?php echo $values[\u0027lastname\u0027] ?\u003e\"\n```\nThese fields output raw user input without sanitization.\n\n### Steps to Reproduce\n1. Login as admin \u003e Go to Settings \u003e Users \u003e Edit any user\n2. Enter HTML payload in First Name or Last Name field:\n   `\u003ch1\u003eINJECTED\u003c/h1\u003e`\n3. Save the user profile\n4. Create or view an article \u2014 the injected HTML renders in the author name\n\n### Fix\nReplace unescaped `echo` with `htmlspecialchars()`:\n```php\nvalue=\"\u003c?php echo htmlspecialchars($values[\u0027firstname\u0027], ENT_QUOTES, \u0027UTF-8\u0027) ?\u003e\"\nvalue=\"\u003c?php echo htmlspecialchars($values[\u0027lastname\u0027], ENT_QUOTES, \u0027UTF-8\u0027) ?\u003e\"\n```\nOr use the existing `$this-\u003ee()` helper already used in `editOwn.tpl.php`.\n\n### Impact\n- Stored HTML injection visible to all users viewing affected content\n- Can be used for phishing, fake login forms, and UI defacement\n- Affects all versions before 3.3.0",
  "id": "GHSA-qrfh-cc86-vc8c",
  "modified": "2026-03-05T18:05:57Z",
  "published": "2026-03-05T18:05:57Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/Leantime/leantime/security/advisories/GHSA-qrfh-cc86-vc8c"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Leantime/leantime/commit/3f8b2c6346111694bb18cec558b27c22d3a2b9d1"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/Leantime/leantime"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Leantime has HTML injection through firstname and lastname fields"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…