Severity:

HIGH RISK

(7.3)

Missing Authentication in localGPT API Endpoint

CVE-2026-5000

Deferred

Vulnerability type

Category:

Missing Authentication

CWE:

CWE-287, CWE-306

Impact:

Unauthorized Access to API Functionality

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

localGPT's LocalGPTHandler API endpoint in backend/server.py contains a missing authentication flaw where BaseHTTPRequestHandler requests are processed without proper identity verification.

A remote attacker who can reach the API endpoint may invoke LocalGPT functionality or related backend operations without credentials, potentially leading to data exposure, prompt abuse, or unauthorized system use.

Affected context

The vulnerability appears in deployments of PromtEngineer localGPT (rolling-release builds up to commit 4d41c7d1713b16b216d8e062e51a5dd88b20b054) that expose the backend/server.py API endpoint (LocalGPTHandler) over a network interface.

It is relevant when:

  • The backend service is reachable from untrusted networks (e.g., internet, shared LAN, or container bridge),
  • No external reverse proxy or gateway enforces authentication in front of LocalGPTHandler, and
  • The default or sample configuration is used without additional access controls.

Exploit preconditions

  • Attack surface: HTTP-based API endpoint implemented by LocalGPTHandler in backend/server.py.
  • Required access: Network-level reachability to the localGPT backend (e.g., IP/port where the service listens).
  • Authentication state: No effective authentication checks within LocalGPTHandler for incoming BaseHTTPRequestHandler requests.
  • Trigger point: Sending crafted HTTP requests to the exposed endpoint that LocalGPTHandler processes as legitimate API calls.
  • Why exploitation is possible: The handler trusts the incoming request context (BaseHTTPRequestHandler) without enforcing user identity verification, session validation, or token checks, allowing any reachable client to invoke protected operations.

Why this happens

This issue stems from the absence or misplacement of authentication logic around the LocalGPTHandler request-processing flow.

Instead of requiring callers to prove their identity (e.g., via API keys, tokens, or sessions), the code likely accepts and processes requests directly from BaseHTTPRequestHandler, effectively treating all traffic as trusted.

This maps to:

  • CWE-287: Improper Authentication, where the system either omits identity verification or performs it incorrectly; and
  • CWE-306: Missing Authentication for Critical Function, because functionality that should be restricted is exposed without any access control enforcement.

Conceptually, the design assumes a trusted environment but exposes the endpoint in a way that is accessible to untrusted clients, leaving the critical API path unguarded.

Potential impact

  • Remote clients can invoke localGPT inference or processing operations without authorization.
  • Attackers could submit arbitrary prompts, potentially exfiltrating sensitive context or data that the instance has access to.
  • Abuse of system resources (CPU, GPU, memory) leading to denial-of-service for legitimate users.
  • Increased risk of prompt injection or misuse of downstream integrated tools and data sources.
  • Potential chaining with other weaknesses (e.g., misconfiguration, excessive model privileges) to escalate impact.

General mitigation guidance

Effective mitigation focuses on enforcing robust authentication and minimizing implicit trust around the API endpoint:

  • Introduce mandatory authentication for all LocalGPTHandler routes (e.g., API tokens, OAuth/JWT, or mutual TLS in front of the handler).
  • Centralize authentication and authorization checks in middleware or decorators that wrap all critical handlers rather than relying on ad-hoc checks in individual functions.
  • Ensure that default configuration does not expose the backend on public interfaces without access control; prefer binding to localhost and using a reverse proxy with strong auth if remote access is required.
  • Apply least-privilege principles to any credentials or integrations the service uses (e.g., file systems, knowledge bases, external APIs) so that an unauthorized caller's reach is minimized.
  • Document deployment hardening guidelines so operators understand that the API is not safe to expose without authentication and network-level controls.

How teams detect issues like this

Security teams can identify and monitor for this class of issue using several approaches:

  • Static analysis: Scan for HTTP handlers and endpoints that lack authentication checks, such as handlers derived from BaseHTTPRequestHandler that do not verify tokens, cookies, or sessions before processing requests.
  • Code review: Look for critical functionality (model inference, data access, administrative operations) reachable via HTTP paths where no explicit authentication or authorization logic is present or is only conditionally executed.
  • Configuration review: Examine deployment manifests, container configurations, and reverse proxy settings to detect services bound to 0.0.0.0 or public interfaces without corresponding access controls.
  • Runtime monitoring: Analyze access logs for unauthenticated calls to sensitive endpoints and create alerts when such patterns are detected from untrusted networks.
  • Automated security testing tools (e.g., API security scanners, DAST) can help probe endpoints for responses to unauthenticated requests that should require credentials.

Sources

SourceLink
github.comgithub.com/August829/CVEP/issues/8
vuldb.comvuldb.com/submit/778315
vuldb.comvuldb.com/vuln/353887
vuldb.comvuldb.com/vuln/353887/cti

Frequently asked

questions

Yes. If the localGPT backend API endpoint is reachable over the network from an attacker-controlled host, the missing authentication allows remote invocation of API operations without valid credentials.

No explicit authentication is required as described. The primary requirement is network access to the service; there is no need for a pre-existing account or local shell on the server.

The safest pattern is to enforce mandatory authentication and authorization on all routes handled by LocalGPTHandler. This typically means adding a central authentication layer (middleware or gateway) that validates each request's credentials before it reaches the handler and rejects unauthenticated traffic by default.

Treat authentication as a default requirement for all non-trivial endpoints. Use standard authentication frameworks, apply "deny by default" policies for new routes, require security review for any unauthenticated paths, and integrate automated checks that flag handlers lacking explicit auth logic during code review or CI.

Find out what's already
exploitable in your codebase.