/

CVE-2026-71241

Severity:

HIGH RISK

(7.5)

Missing Authentication (CWE-306) in Flask Book API

CVE-2026-71241

Deferred

Vulnerability type

Category:

Missing Authentication

CWE:

CWE-306

Impact:

Unauthorized access to sensitive student and borrowing data

Severity:

HIGH RISK

(7.5)

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

Several Flask API endpoints in the Book-Management-System do not enforce authentication, allowing unauthenticated remote users to access student personal information and book-borrowing records. Because card identifiers are sequential, an attacker may enumerate records across the student database by supplying different identifiers.

Affected context

The vulnerability occurs in Flask API routes that expose student and book information without the authentication protection applied to related endpoints. It becomes risky when these routes are reachable over a network, accept user-controlled card identifiers, and return records without verifying the caller's identity or authorization to access the requested data.

Exploit preconditions

  • Attack surface: Network-accessible Flask API endpoints /student, /record, /books, /find_stu_book, and /find_not_return_book
  • Required access: No authenticated account is required
  • Trigger point: A request containing a student card_id
  • Why exploitation is possible: The affected routes omit required authentication checks, and sequential card identifiers may allow broad record enumeration

Potential impact

  • Unauthorized disclosure of student names and genders
  • Exposure of card validity and debt status
  • Disclosure of complete or partial book-borrowing histories
  • Bulk harvesting of student records
  • Privacy violations and possible regulatory or reputational consequences

General mitigation guidance

Mitigation generally focuses on enforcing authentication and authorization

consistently across every endpoint that exposes sensitive records.

Common defensive patterns include:

  • Applying authentication middleware or decorators by default to protected API routes
  • Enforcing object-level authorization so callers can access only permitted student records
  • Reducing reliance on predictable identifiers for record lookup
  • Minimizing returned fields and avoiding unnecessary exposure of personal data
  • Using deny-by-default route policies and explicit exceptions for genuinely public endpoints
  • Applying least-privilege access to service accounts and data stores
  • Adding automated tests that verify unauthenticated and unauthorized requests are rejected

How teams detect issues like this

Organizations commonly detect missing authentication through:

  • Static analysis and route inventories that identify handlers lacking authentication middleware
  • Code review checks comparing sibling protected routes with newly added endpoints
  • API security tests for unauthenticated access and object-level authorization failures
  • Policy enforcement requiring authentication metadata on routes returning sensitive data
  • Monitoring for repeated requests involving sequential or rapidly changing identifiers

Neutral automated code review tools may help identify inconsistent decorator or middleware usage.

Sources

SourceLink
github.comgithub.com/lyric777/Book-Management-System

Frequently asked

questions

Yes. If the affected Flask endpoints are network-accessible, an unauthenticated

remote user may request sensitive records directly.

No authenticated account is required according to the described behavior.

Network reachability and a usable card identifier are the important conditions.

Protect every sensitive endpoint with authentication and enforce authorization

for the specific student or borrowing record being requested. Authentication

alone should not grant access to every record.

Use deny-by-default route policies, maintain an inventory of sensitive APIs,

add unauthenticated and cross-user access tests, and avoid predictable

identifiers where they could enable record enumeration.

Find out what's already
exploitable in your codebase.