CVE-2026-80198
Kimai before 2.56.0 Information Disclosure via config() Twig Function
Kimai versions before 2.56.0 fail to restrict the config() Twig function in sandboxed invoice and export templates, allowing administrators to access arbitrary configuration keys. Attackers with admin privileges can upload malicious templates to exfiltrate server-wide secrets including LDAP bind passwords and SAML private keys into invoice or export documents accessible to lower-privileged users.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
8.7
Kimai before 2.56.0 Information Disclosure via config() Twig Function
Kimai versions before 2.56.0 fail to restrict the config() Twig function in sandboxed invoice and export templates, allowing administrators to access arbitrary configuration keys. Attackers with admin privileges can upload malicious templates to exfiltrate server-wide secrets including LDAP bind passwords and SAML private keys into invoice or export documents accessible to lower-privileged users.
- Record
CVE-2026-80198- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-693
- Updated
- 2026-11-02
EUVDEUVD-2026-66220
8.7
Kimai versions before 2.56.0 fail to restrict the config() Twig function in sandboxed invoice and export templates, allowing administrators to access arbitrary configuration keys. Attackers with admin privileges can upload malicious templates to exfiltrate server-wide secrets including LDAP bind passwords and SAML private keys into invoice or export documents accessible to lower-privileged users.
- Record
EUVD-2026-66220- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-vrqv-52x7-rm4v
5.0
Kimai's Twig function config() leaks server-wide secrets (LDAP bind password, SAML SP private key) via invoice/export templates
Summary
Kimai's Twig sandbox (StrictPolicy, used for admin-uploaded invoice and export templates) allow-lists the config() Twig function with no key filtering. config(name) delegates to App\Configuration\SystemConfiguration::find($name), which returns arbitrary entries from the flattened kimai.config container parameter built in App\DependencyInjection\AppExtension::loadInternal(). Any admin who can upload a Twig template can therefore render server-wide secrets - the LDAP bind password, the SAML SP private key, and any other dotted configuration key populated from kimai.yaml - into the invoice or export output, which is then delivered to whoever generates an invoice or export from that template (including lower-privileged users such as teamleads with invoice permissions). This is a second, uncovered class of the same defense-in-depth issue patched in GHSA-rh42-6rj2-xwmc: the previous fix added a User-method blocklist but left the config() function unrestricted.
Details
src/Twig/SecurityPolicy/StrictPolicy.php:40-55 explicitly allow-lists 'config':
private array $allowedFunctions = [
'max', 'min', 'range', 'constant', 'cycle', 'random', 'date',
't',
'encore_entry_css_source', 'encore_entry_link_tags', 'encore_entry_script_tags',
'is_granted',
'qr_code_data_uri',
'config', // <-- sink, no key filter
'create_date', 'month_names', 'locale_format',
'class_name'
];
src/Twig/Configuration.php:22-45 is the Twig function implementation:
public function getFunctions(): array
{
return [new TwigFunction('config', [$this, 'get'])];
}
public function get(string $name)
{
switch ($name) {
case 'chart-class': return '';
case 'theme.chart.background_color': return '#3c8dbc';
// ... 4 more theme constants
}
return $this->configuration->find($name); // <-- arbitrary key lookup
}
App\Configuration\SystemConfiguration::find() at src/Configuration/SystemConfiguration.php:54-62 is a direct dictionary lookup. The dictionary $this->settings is initialised from the kimai.config container parameter, which the AppExtension flattens from kimai.yaml into dotted-notation keys.
The LDAP and SAML schemas declared in `src/DependencyInjection/Configuration.php` define secret-valued scalar nodes that survive the flattening and become reachable keys:
```php
// getLdapNode()
->arrayNode('connection')
->children()
->scalarNode('host')->defaultNull()->end()
->scalarNode('username')->end()
->scalarNode('password')->end() // -> settings['ldap.connection.password']
...
// getSamlNode()
->arrayNode('sp')
->children()
->scalarNode('x509cert')->end()
->scalarNode('privateKey')->end() // -> settings['saml.connection.sp.privateKey']
...
The invoice and export renderers both enable the sandbox against StrictPolicy and pass the shared Twig environment - the one with the config function registered - into sandboxed rendering: src/Invoice/Renderer/AbstractTwigRenderer.php:66-74 and src/Export/Base/{PDFRenderer,HtmlRenderer}.php. An admin who uploads a malicious invoice or export template therefore gets an unrestricted read primitive against kimai.config.
In a real deployment the attacker template is uploaded through the admin UI (ROLE_SUPER_ADMIN, permission upload_invoice_template), saved by src/Invoice/InvoiceTemplate* and later rendered by whoever generates an invoice or export for that template. The rendering user is typically a teamlead or admin with invoice permission (INVOICE permission set: ['view_invoice','create_invoice','manage_invoice_template'], granted to ROLE_ADMIN and ROLE_TEAMLEAD in config/packages/kimai.yaml). The rendered output is returned as the invoice PDF/HTML or as a CSV/XLSX export, so the secrets land in a document that is routinely downloaded and emailed.
…
- Record
GHSA-vrqv-52x7-rm4v- CVSS 4.0
- 5.0 Medium
CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P - Weakness
- CWE-693
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-w754-75mx-556q
8.7
Kimai versions before 2.56.0 fail to restrict the config() Twig function in sandboxed invoice and...
Kimai versions before 2.56.0 fail to restrict the config() Twig function in sandboxed invoice and export templates, allowing administrators to access arbitrary configuration keys. Attackers with admin privileges can upload malicious templates to exfiltrate server-wide secrets including LDAP bind passwords and SAML private keys into invoice or export documents accessible to lower-privileged users.
- Record
GHSA-w754-75mx-556q- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-693
- Updated
- 2026-11-02
NVD
8.7
Kimai versions before 2.56.0 fail to restrict the config() Twig function in sandboxed invoice and export templates, allowing administrators to access arbitrary configuration keys. Attackers with admin privileges can upload malicious templates to exfiltrate server-wide secrets including LDAP bind passwords and SAML private keys into invoice or export documents accessible to lower-privileged users.
- Record
CVE-2026-80198- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-693
- Updated
- 2026-11-02
OSV
8.7
Kimai before 2.56.0 Information Disclosure via config() Twig Function
Kimai versions before 2.56.0 fail to restrict the config() Twig function in sandboxed invoice and export templates, allowing administrators to access arbitrary configuration keys. Attackers with admin privileges can upload malicious templates to exfiltrate server-wide secrets including LDAP bind passwords and SAML private keys into invoice or export documents accessible to lower-privileged users.
- Record
CVE-2026-80198- CVSS 4.0
- 8.7 High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-693
- Updated
- 2026-11-02
OSVGHSA-vrqv-52x7-rm4v
5.0
Kimai's Twig function config() leaks server-wide secrets (LDAP bind password, SAML SP private key) via invoice/export templates
Summary
Kimai's Twig sandbox (StrictPolicy, used for admin-uploaded invoice and export templates) allow-lists the config() Twig function with no key filtering. config(name) delegates to App\Configuration\SystemConfiguration::find($name), which returns arbitrary entries from the flattened kimai.config container parameter built in App\DependencyInjection\AppExtension::loadInternal(). Any admin who can upload a Twig template can therefore render server-wide secrets - the LDAP bind password, the SAML SP private key, and any other dotted configuration key populated from kimai.yaml - into the invoice or export output, which is then delivered to whoever generates an invoice or export from that template (including lower-privileged users such as teamleads with invoice permissions). This is a second, uncovered class of the same defense-in-depth issue patched in GHSA-rh42-6rj2-xwmc: the previous fix added a User-method blocklist but left the config() function unrestricted.
Details
src/Twig/SecurityPolicy/StrictPolicy.php:40-55 explicitly allow-lists 'config':
private array $allowedFunctions = [
'max', 'min', 'range', 'constant', 'cycle', 'random', 'date',
't',
'encore_entry_css_source', 'encore_entry_link_tags', 'encore_entry_script_tags',
'is_granted',
'qr_code_data_uri',
'config', // <-- sink, no key filter
'create_date', 'month_names', 'locale_format',
'class_name'
];
src/Twig/Configuration.php:22-45 is the Twig function implementation:
public function getFunctions(): array
{
return [new TwigFunction('config', [$this, 'get'])];
}
public function get(string $name)
{
switch ($name) {
case 'chart-class': return '';
case 'theme.chart.background_color': return '#3c8dbc';
// ... 4 more theme constants
}
return $this->configuration->find($name); // <-- arbitrary key lookup
}
App\Configuration\SystemConfiguration::find() at src/Configuration/SystemConfiguration.php:54-62 is a direct dictionary lookup. The dictionary $this->settings is initialised from the kimai.config container parameter, which the AppExtension flattens from kimai.yaml into dotted-notation keys.
The LDAP and SAML schemas declared in `src/DependencyInjection/Configuration.php` define secret-valued scalar nodes that survive the flattening and become reachable keys:
```php
// getLdapNode()
->arrayNode('connection')
->children()
->scalarNode('host')->defaultNull()->end()
->scalarNode('username')->end()
->scalarNode('password')->end() // -> settings['ldap.connection.password']
...
// getSamlNode()
->arrayNode('sp')
->children()
->scalarNode('x509cert')->end()
->scalarNode('privateKey')->end() // -> settings['saml.connection.sp.privateKey']
...
The invoice and export renderers both enable the sandbox against StrictPolicy and pass the shared Twig environment - the one with the config function registered - into sandboxed rendering: src/Invoice/Renderer/AbstractTwigRenderer.php:66-74 and src/Export/Base/{PDFRenderer,HtmlRenderer}.php. An admin who uploads a malicious invoice or export template therefore gets an unrestricted read primitive against kimai.config.
In a real deployment the attacker template is uploaded through the admin UI (ROLE_SUPER_ADMIN, permission upload_invoice_template), saved by src/Invoice/InvoiceTemplate* and later rendered by whoever generates an invoice or export for that template. The rendering user is typically a teamlead or admin with invoice permission (INVOICE permission set: ['view_invoice','create_invoice','manage_invoice_template'], granted to ROLE_ADMIN and ROLE_TEAMLEAD in config/packages/kimai.yaml). The rendered output is returned as the invoice PDF/HTML or as a CSV/XLSX export, so the secrets land in a document that is routinely downloaded and emailed.
…
- Record
GHSA-vrqv-52x7-rm4v- CVSS 4.0
- 5.0 Medium
CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P - Weakness
- CWE-693
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
kimai/kimaiPackagist |
through 2.55.0 | 2.56.0 |
kimai/kimaiPackagist |
before 2.56.0, plus listed versions 0.10.20.30.40.5 Show 45 moreShow less0.60.6.10.70.80.8.10.91.01.0.11.11.101.10.11.10.21.111.11.11.121.131.141.14.11.14.21.14.31.151.15.11.15.21.15.31.15.41.15.51.15.61.161.16.11.16.101.16.21.16.31.16.41.16.51.16.61.16.71.16.81.16.91.171.17.11.181.18.11.18.21.191.19.1 |
2.56.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-80198 is a high vulnerability (CVSS 8.7) in Kimai, published May 6, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.43%, the 37th percentile. Fixed in kimai/kimai 2.56.0.
References
github.com/kimai/kimai/security/advisories/GHSA-vrqv-52x7-rm4v
vulncheck.com/advisories/kimai-before-2.56.0-information-disclosure-via-config-twig-function
github.com/advisories/GHSA-vrqv-52x7-rm4v
nvd.nist.gov/vuln/detail/CVE-2026-80198
github.com/advisories/GHSA-w754-75mx-556q
github.com/CVEProject/cvelistV5/tree/main/cves/2026/80xxx/CVE-2026-80198.json
github.com/kimai/kimai
Left out here: 151 versions and the rest of 2 source descriptions. The JSON record has them.