/

CVE-2026-107809

Severity:

HIGH RISK

(8.8)

CSRF (CWE-352) in Nginx UI Admin Management Interface

CVE-2026-107809

Undergoing Analysis

Vulnerability type

Category:

Cross-Site Request Forgery

CWE:

CWE-352

Impact:

Unauthorized configuration changes and administrative actions

Severity:

HIGH RISK

(8.8)

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

Nginx UI contains a cross-site request forgery vulnerability in management endpoints that accept a browser-managed authentication cookie without consistently requiring CSRF protection or validating request origins. A remote attacker may cause a logged-in administrator's browser to submit authenticated state-changing requests, potentially modifying Nginx configuration or triggering administrative operations.

Nginx UI contains a cross-site request forgery vulnerability in management endpoints that accept a browser-managed authentication cookie without consistently requiring CSRF protection or validating request origins. A remote attacker may cause a logged-in administrator's browser to submit authenticated state-changing requests, potentially modifying Nginx configuration or triggering administrative operations.

Affected context

The issue affects Nginx UI deployments in the affected version range when:

  • The front end stores a JWT in a browser-managed cookie
  • API authentication accepts that cookie as a credential
  • A management endpoint does not consistently require a CSRF token or validate Origin or Referer headers
  • An administrator is logged in and has a session that does not require additional secure-session proof

Risk is greater for administrator accounts without OTP or passkey protection and for endpoints that perform state-changing operations.

The issue affects Nginx UI deployments in the affected version range when:

  • The front end stores a JWT in a browser-managed cookie
  • API authentication accepts that cookie as a credential
  • A management endpoint does not consistently require a CSRF token or validate Origin or Referer headers
  • An administrator is logged in and has a session that does not require additional secure-session proof

Risk is greater for administrator accounts without OTP or passkey protection and for endpoints that perform state-changing operations.

Exploit preconditions

  • Attack surface: Nginx UI management API endpoints exposed to an administrator's browser
  • Required access: A victim administrator must be authenticated in the target browser
  • Trigger point: A cross-site request that reaches an authenticated, state-changing management endpoint
  • Why exploitation is possible: The browser may automatically attach the authentication cookie while the server does not consistently require an independent CSRF token or verify the request's origin
  • Attack surface: Nginx UI management API endpoints exposed to an administrator's browser
  • Required access: A victim administrator must be authenticated in the target browser
  • Trigger point: A cross-site request that reaches an authenticated, state-changing management endpoint
  • Why exploitation is possible: The browser may automatically attach the authentication cookie while the server does not consistently require an independent CSRF token or verify the request's origin

Why this happens

The underlying flaw is insufficient separation between authentication and request authorization. A browser-managed authentication cookie can be sent with cross-site requests, but the affected management endpoints do not universally apply a CSRF defense such as an unpredictable request token or strict origin validation.

This maps to CWE-352: Cross-Site Request Forgery, where an application accepts a state-changing request because it carries valid ambient browser credentials, even though the request was initiated from an untrusted site.

The underlying flaw is insufficient separation between authentication and request authorization. A browser-managed authentication cookie can be sent with cross-site requests, but the affected management endpoints do not universally apply a CSRF defense such as an unpredictable request token or strict origin validation.

This maps to CWE-352: Cross-Site Request Forgery, where an application accepts a state-changing request because it carries valid ambient browser credentials, even though the request was initiated from an untrusted site.

Potential impact

  • An attacker may alter Nginx configuration
  • An attacker could trigger configuration reloads or other management operations
  • Service availability or routing behavior may be affected
  • Security controls or proxy behavior could be weakened
  • Downstream systems may be exposed to unauthorized traffic or configuration changes
  • An attacker may alter Nginx configuration
  • An attacker could trigger configuration reloads or other management operations
  • Service availability or routing behavior may be affected
  • Security controls or proxy behavior could be weakened
  • Downstream systems may be exposed to unauthorized traffic or configuration changes

General mitigation guidance

Mitigation generally focuses on ensuring that browser-authenticated state-changing requests include proof of intentional user interaction.

Common defensive patterns include:

  • Requiring robust, unpredictable CSRF tokens on all state-changing endpoints
  • Validating Origin headers, with carefully defined Referer fallback behavior where appropriate
  • Using cookie attributes such as Secure and an appropriately restrictive SameSite policy
  • Applying consistent protections across every management endpoint, including less frequently used operations
  • Separating API credentials from ambient browser cookies when browser-based administration is not required
  • Requiring OTP, passkeys, or other step-up authentication for sensitive administrative actions
  • Limiting administrative privileges and restricting management interfaces to trusted networks

These controls reduce reliance on automatically transmitted browser credentials and limit the consequences of a forged request.

Mitigation generally focuses on ensuring that browser-authenticated state-changing requests include proof of intentional user interaction.

Common defensive patterns include:

  • Requiring robust, unpredictable CSRF tokens on all state-changing endpoints
  • Validating Origin headers, with carefully defined Referer fallback behavior where appropriate
  • Using cookie attributes such as Secure and an appropriately restrictive SameSite policy
  • Applying consistent protections across every management endpoint, including less frequently used operations
  • Separating API credentials from ambient browser cookies when browser-based administration is not required
  • Requiring OTP, passkeys, or other step-up authentication for sensitive administrative actions
  • Limiting administrative privileges and restricting management interfaces to trusted networks

These controls reduce reliance on automatically transmitted browser credentials and limit the consequences of a forged request.

How teams detect issues like this

Organizations can identify related risks through:

  • Static analysis for state-changing routes that rely only on cookie authentication
  • Code review checks for missing CSRF middleware or inconsistent protection across API endpoints
  • Tests that verify cross-origin POST, PUT, PATCH, and DELETE requests are rejected
  • Policy checks requiring Origin validation or CSRF tokens for administrative operations
  • Web application monitoring for unusual cross-origin management requests, configuration changes, or reload activity

Automated security testing and code review tools may help identify endpoints with inconsistent request-forgery defenses.

Organizations can identify related risks through:

  • Static analysis for state-changing routes that rely only on cookie authentication
  • Code review checks for missing CSRF middleware or inconsistent protection across API endpoints
  • Tests that verify cross-origin POST, PUT, PATCH, and DELETE requests are rejected
  • Policy checks requiring Origin validation or CSRF tokens for administrative operations
  • Web application monitoring for unusual cross-origin management requests, configuration changes, or reload activity

Automated security testing and code review tools may help identify endpoints with inconsistent request-forgery defenses.

Sources

SourceLink
github.comgithub.com/0xJacky/nginx-ui/commit/a3999bd78a3b97ab22e6b5e9fd478ac57598a954
github.comgithub.com/0xJacky/nginx-ui/releases/tag/v2.5.0
github.comgithub.com/0xJacky/nginx-ui/security/advisories/GHSA-33rr-wq23-g6gg

Frequently asked

questions

It can be triggered remotely through a malicious website or cross-site request, but successful impact generally depends on a logged-in administrator's browser automatically supplying a valid session cookie.

The attacker typically does not need the administrator's password. The required condition is an active victim administrator session and an endpoint that accepts the session without sufficient CSRF or origin protections.

Apply consistent CSRF protection to every state-changing management endpoint, validate trusted request origins, and use restrictive cookie settings as defense in depth.

Treat browser cookies as ambient credentials, require explicit request-integrity proof for administrative actions, test all management routes for cross-origin behavior, and apply least privilege with step-up authentication for sensitive operations.

It can be triggered remotely through a malicious website or cross-site request, but successful impact generally depends on a logged-in administrator's browser automatically supplying a valid session cookie.

The attacker typically does not need the administrator's password. The required condition is an active victim administrator session and an endpoint that accepts the session without sufficient CSRF or origin protections.

Apply consistent CSRF protection to every state-changing management endpoint, validate trusted request origins, and use restrictive cookie settings as defense in depth.

Treat browser cookies as ambient credentials, require explicit request-integrity proof for administrative actions, test all management routes for cross-origin behavior, and apply least privilege with step-up authentication for sensitive operations.

Find out what's already
exploitable in your codebase.