# EFAK: any logged-in user reads the AI assistant's provider keys

> EFAK stores the provider keys its AI assistant uses, and its REST API returns them unmasked to any account that can log in.

- **Severity:** Medium: Real and reproducible, but needs unusual setup, user help or a narrow audience. Plan a fix.
- **Category:** Vulnerability
- **Published by:** VulnCheck
- **Disclosed:** 2026-10-15
- **CVE:** CVE-2026-111682
- **CVSS:** 7.1
- **Affects:** EFAK
- **Research by:** [hieuPenguinnn](https://github.com/hieuPenguinnn)
- **Primary source:** https://www.vulncheck.com/advisories/efak-5.0.0-through-5.1.0-missing-authorization-via-api-model-config-exposes-api-keys
- **Page:** https://theinjection.dev/items/efak-model-config-api-key-exposure/

CVE-2026-111682 lets any EFAK account with the default ROLE_USER role call /api/model-config and read unmasked LLM provider API keys. The same missing admin gate also lets that account make itself an administrator. No fixed version exists.

## What happened

VulnCheck published CVE-2026-111682 and CVE-2026-111681 for EFAK on October 16, 2026, both recording October 15 as the public disclosure date and both crediting the finder hieuPenguinnn. The finder's HackMD write-up documents a source review of the v5.1.0 tag and states that no requests were sent to a running instance. The GitHub Advisory Database listed the key exposure the same day, unreviewed.

## How it works

EFAK builds one Spring Security filter chain, and that chain asks for the ADMIN role only on page paths such as /users and /config, plus /api/password/**. Every other route falls through to a rule that asks for nothing but a login. The REST controllers behind those admin pages carry no method-level annotation and no interceptor, so ModelConfigController answers any authenticated caller, and its listing handler copies the stored apiKey straight into the response. UserController is open the same way and reads the roles value out of the request body, so a caller can name itself an administrator. CSRF protection is disabled globally, so a logged-in victim's browser can be made to send those writes.

## Who is affected

Self-hosted EFAK is exposed in versions 5.0.0 through 5.1.0, the range both CVE records list, and the project's changelog dates 5.1.0 to September 12, 2026. One ordinary account is enough: the low-privilege ROLE_USER role reaches both APIs, so every user an operator has added can reach them. The keys at risk belong to the models EFAK's AI assistant talks to, which its README lists as OpenAI, Claude and DeepSeek.

## What to do

Treat every provider key stored in an EFAK deployment as exposed and rotate it with the model provider, because no advisory names a patched version. Block outside access to the instance and check the user list for accounts holding the admin role without reason. Operators who patch locally can follow the write-up: put /api/users/**, /api/model-config/** and /api/scheduler/** behind the ADMIN matcher, annotate the admin controllers, verify that a caller may assign the role it asks for instead of trusting the request body, and mask apiKey on every read path.

## Quick facts

- **CVEs:** CVE-2026-111682 (CVSS 4.0 7.1) and CVE-2026-111681 (8.7), both assigned by VulnCheck
- **Affected:** EFAK 5.0.0 through 5.1.0
- **Fixed in:** No patched version named
- **Attack type:** Missing authorization on REST routes, CWE-862
- **Open routes:** GET /api/model-config/page and /api/model-config/{id}, plus POST, PUT and DELETE on /api/users
- **Needs:** Any account on the instance, including the default ROLE_USER role
- **Found by:** hieuPenguinnn, from source review with no live requests
- **Disclosed:** October 15, 2026; CVEs published October 16

## Sources

1. [VulnCheck Advisory](https://www.vulncheck.com/advisories/efak-5.0.0-through-5.1.0-missing-authorization-via-api-model-config-exposes-api-keys)
2. [Researcher Write-Up](https://hackmd.io/@hieuPenguinnn/efak-missing-admin-gate-user-management-api)
3. [CVE Record](https://cveawg.mitre.org/api/cve/CVE-2026-111682)
4. [Admin Escalation CVE](https://cveawg.mitre.org/api/cve/CVE-2026-111681)
5. [GitHub Advisory](https://github.com/advisories/GHSA-jqpg-p8wq-hcmv)
6. [Model Config Source](https://github.com/smartloli/EFAK/blob/v5.1.0/efak-web/src/main/java/org/kafka/eagle/web/controller/ModelConfigController.java#L34-L56)
7. [Security Config Source](https://github.com/smartloli/EFAK/blob/v5.1.0/efak-web/src/main/java/org/kafka/eagle/web/security/config/WebSecurityConfig.java#L89-L93)
