/

CVE-2026-35490

Severity:

CRITICAL RISK

(9.8)

Missing Authorization in changedetection.io Flask Routes

CVE-2026-35490

Analyzed

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-863

Impact:

Unauthorized Access to Protected Functionality

Severity:

CRITICAL RISK

(9.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

A decorator ordering mistake in changedetection.io causes certain Flask routes to be registered without their intended authentication wrapper.

Because the framework's @route() decorator is applied inside the custom @login_optionally_required decorator, Flask binds the original undecorated function, silently disabling authentication and exposing endpoints that should require login.

Affected context

This vulnerability occurs in changedetection.io routes that are intended to be protected by the @login_optionally_required decorator.

In affected versions, @login_optionally_required is applied outside of @blueprint.route(), which in Flask means the routing layer never sees the wrapped (authenticated) function.

Any deployment relying on these routes for user-specific or sensitive operations may be impacted if it assumes that login is enforced at the framework level.

Exploit preconditions

  • Attack surface: HTTP endpoints exposed by the changedetection.io application
  • Required access: Network access to the affected routes (no prior authentication required)
  • Trigger point: Direct invocation of routes that were intended to require optional or conditional login but are registered without the auth wrapper
  • Why exploitation is possible: Flask's decorator ordering semantics cause @blueprint.route() to register the original function before the authentication decorator is applied, so the authorization logic is never executed for those requests

Why this happens

The root cause is a misuse of Flask decorators, where the route registration decorator must be the outermost decorator for the framework to correctly associate a view function with a URL rule.

By placing @login_optionally_required outside of @blueprint.route(), the application wraps a function that Flask no longer calls, while Flask itself routes requests to the original unwrapped view.

This design flaw aligns with CWE-863: Incorrect Authorization, because the application intends to enforce authentication but fails to attach the authorization mechanism to the actual execution path of the protected endpoints.

Potential impact

  • Unauthenticated users can access endpoints that were intended to require login
  • Exposure of user-specific or sensitive configuration data
  • Unauthorized modification of application settings or watch configurations
  • Increased risk of data leakage or manipulation in multi-user deployments

General mitigation guidance

Effective mitigation focuses on ensuring that authorization logic is structurally attached to every protected endpoint and cannot be bypassed by framework nuances.

Common defensive patterns include:

  • Ensuring routing decorators (e.g., @app.route, @blueprint.route) are applied last (outermost) so they register the fully wrapped function
  • Centralizing authentication and authorization in middleware, blueprints, or application-level before-request hooks rather than relying solely on per-route decorator order
  • Defining explicit access control policies for each route and documenting which endpoints must always enforce authentication
  • Implementing defense-in-depth by validating user identity and permissions within business logic, not only at the routing layer
  • Using secure-by-default patterns where routes are private unless explicitly marked as public

How teams detect issues like this

Detecting this class of issue involves both code-level analysis and behavioral checks:

  • Static analysis or linters that flag Flask routes where authorization decorators do not directly wrap the view function or where @route is not the outermost decorator
  • Code review guidelines that explicitly require checking decorator ordering on all view functions and verifying that protected endpoints are wrapped by authentication decorators
  • Automated tests that attempt to access protected routes without authentication and assert that access is denied
  • Runtime monitoring or security testing (e.g., integration tests, DAST) to scan for endpoints that respond successfully without login despite being documented as protected

Sources

SourceLink
github.comgithub.com/dgtlmoon/changedetection.io/security/advisories/GHSA-jmrh-xmgh-x9j4

Frequently asked

questions

Yes. Any unauthenticated user with network access to the affected changedetection.io instance can reach the impacted routes without logging in.

Only network access to the web interface is required. No credentials or prior session are needed when hitting routes whose authentication wrapper is not in the call chain.

Ensure that the framework's routing decorators are the outermost decorators so that the registered view function includes all authentication and authorization wrappers.

Additionally, centralize access control where possible (e.g., middleware or before-request hooks) so decorator ordering mistakes are less likely to remove protections.

Adopt coding standards for decorator ordering, add automated tests for access control on protected endpoints, and use static checks or code review practices that verify every route's authentication and authorization configuration.

Find out what's already
exploitable in your codebase.