Skip to content

Commit e7250de

Browse files
1 parent e1d960d commit e7250de

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-qrfh-cc86-vc8c",
4+
"modified": "2026-03-05T18:05:57Z",
5+
"published": "2026-03-05T18:05:57Z",
6+
"aliases": [],
7+
"summary": "Leantime has HTML injection through firstname and lastname fields",
8+
"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=\"<?php echo $values['firstname'] ?>\"\nvalue=\"<?php echo $values['lastname'] ?>\"\n```\nThese fields output raw user input without sanitization.\n\n### Steps to Reproduce\n1. Login as admin > Go to Settings > Users > Edit any user\n2. Enter HTML payload in First Name or Last Name field:\n `<h1>INJECTED</h1>`\n3. Save the user profile\n4. Create or view an article — the injected HTML renders in the author name\n\n### Fix\nReplace unescaped `echo` with `htmlspecialchars()`:\n```php\nvalue=\"<?php echo htmlspecialchars($values['firstname'], ENT_QUOTES, 'UTF-8') ?>\"\nvalue=\"<?php echo htmlspecialchars($values['lastname'], ENT_QUOTES, 'UTF-8') ?>\"\n```\nOr use the existing `$this->e()` 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",
9+
"severity": [
10+
{
11+
"type": "CVSS_V3",
12+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
13+
}
14+
],
15+
"affected": [
16+
{
17+
"package": {
18+
"ecosystem": "Packagist",
19+
"name": "leantime/leantime"
20+
},
21+
"ranges": [
22+
{
23+
"type": "ECOSYSTEM",
24+
"events": [
25+
{
26+
"introduced": "0"
27+
},
28+
{
29+
"fixed": "3.3.0"
30+
}
31+
]
32+
}
33+
]
34+
}
35+
],
36+
"references": [
37+
{
38+
"type": "WEB",
39+
"url": "https://github.com/Leantime/leantime/security/advisories/GHSA-qrfh-cc86-vc8c"
40+
},
41+
{
42+
"type": "WEB",
43+
"url": "https://github.com/Leantime/leantime/commit/3f8b2c6346111694bb18cec558b27c22d3a2b9d1"
44+
},
45+
{
46+
"type": "PACKAGE",
47+
"url": "https://github.com/Leantime/leantime"
48+
}
49+
],
50+
"database_specific": {
51+
"cwe_ids": [
52+
"CWE-79"
53+
],
54+
"severity": "MODERATE",
55+
"github_reviewed": true,
56+
"github_reviewed_at": "2026-03-05T18:05:57Z",
57+
"nvd_published_at": null
58+
}
59+
}

0 commit comments

Comments
 (0)