CWEweakness

CWE-807 Reliance on Untrusted Inputs in a Security Decision

High Official page ↗
Abstraction
Base
Structure
Simple
Status
Incomplete
Likelihood of exploit
High
Languages
Not Language-Specific
CWE version
5.0

Description

The product uses a protection mechanism that relies on the existence or values of an input, but the input can be modified by an untrusted actor in a way that bypasses the protection mechanism.

Extended description

Without sufficient encryption, integrity checking, or other mechanism, any input that originates from an outsider cannot be trusted.

Common consequences

• Confidentiality, Access Control, Availability: Bypass Protection Mechanism, Gain Privileges or Assume Identity, Varies by Context — When security decisions such as authentication and authorization are made based on the values of these inputs, attackers can bypass the security of the product to access whatever is being protected. An attacker could change these inputs using customized clients or other attacks. This change might not be detected. The consequences will depend on the associated functionality, but they can range from granting additional privileges to untrusted users to bypassing important security checks. Ultimately, this weakness may lead to exposure or modification of sensitive data, system crash, or execution of arbitrary code.

Potential mitigations

• [Architecture and Design] Store state information and sensitive data on the server side only. Ensure that the system definitively and unambiguously keeps track of its own state and user state and has rules defined for legitimate state transitions. Do not allow any application user to affect state directly in any way other than through legitimate actions leading to state transitions. If information must be stored on the client, do not do so without encryption and integrity checking, or otherwise having a mechanism on the server side to catch tampering. Use a message authentication code (MAC) algorithm, such as Hash Message Authentication Code (HMAC) [REF-529]. Apply this against the state or sensitive data that has to be exposed, which can guarantee the integrity of the data - i.e., that the data has not been modified. Ensure that a strong hash function is used (CWE-328). • [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. With a stateless protocol such as HTTP, use a framework that maintains the state for you. Examples include ASP.NET View State [REF-756] and the OWASP ESAPI Session Management feature [REF-45]. Be careful of language features that provide state support, since these might be provided as a convenience to the programmer and may not be considering security. • [Architecture and Design] For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server. • [Operation, Implementation] When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues. • [Architecture and Design, Implementation] Understand all the potential areas where untrusted inputs can enter your software: parameters or arguments, cookies, anything read from the network, environment variables, reverse DNS lookups, query results, request headers, URL components, e-mail, files, filenames, databases, and any external systems that provide data to the application. Remember that such inputs may be obtained indirectly through API calls. Identify all inputs that are used for security decisions and determine if you can modify the design so that you do not have to rely on submitted inputs at all. For example, you may be able to keep critical information about the user's session on the server side instead of recording it within external data.

Detection methods

• Manual Static Analysis: Since this weakness does not typically appear frequently within a single software package, manual white box techniques may be able to provide sufficient code coverage and reduction of false positives if all potentially-vulnerable operations can be assessed within limited time constraints. • Automated Static Analysis - Binary or Bytecode: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Bytecode Weakness Analysis - including disassembler + source code weakness analysis • Binary Weakness Analysis - including disassembler + source code weakness analysis • Manual Static Analysis - Binary or Bytecode: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies • Dynamic Analysis with Automated Results Interpretation: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Web Application Scanner • Web Services Scanner • Database Scanners • Dynamic Analysis with Manual Results Interpretation: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Fuzz Tester • Framework-based Fuzzer • Monitored Virtual Environment - run potentially malicious code in sandbox / wrapper / virtual machine, see if it does anything suspicious • Manual Static Analysis - Source Code: According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: • Manual Source Code Review (not inspections) • Automated Static Analysis - Source Code: According to SOAR [REF-1479], the following detection techniques may be useful: Cost effective for partial coverage: • Source code Weakness Analyzer • Context-configured Source Code Weakness Analyzer • Architecture or Design Review: According to SOAR [REF-1479], the following detection techniques may be useful: Highly cost effective: • Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.) • Formal Methods / Correct-By-Construction Cost effective for partial coverage: • Attack Modeling

Observed examples

• CVE-2009-1549: Attacker can bypass authentication by setting a cookie to a specific value. • CVE-2009-1619: Attacker can bypass authentication and gain admin privileges by setting an "admin" cookie to 1. • CVE-2009-0864: Content management system allows admin privileges by setting a "login" cookie to "OK." • CVE-2008-5784: e-dating application allows admin privileges by setting the admin cookie to 1. • CVE-2008-6291: Web-based email list manager allows attackers to gain admin privileges by setting a login cookie to "admin."

Related

Observed example · CVE (5)

  • CVE-2009-1619 Teraway FileStream 1.0 allows remote attackers to bypass authentication and gain administrative access by setting the twFSadmin cookie to 1. vulnerability
  • CVE-2009-1549 AGTC MyShop 3.2b allows remote attackers to bypass authentication and obtain administrative access setting the log_accept cookie to… vulnerability
  • CVE-2009-0864 S-Cms 1.1 Stable allows remote attackers to bypass authentication and obtain administrative access via an OK value for the login cookie. vulnerability
  • CVE-2008-6291 Acc PHP eMail 1.1 allows remote attackers to bypass authentication and gain administrative access by setting the NEWSLETTERLOGIN cookie to… vulnerability
  • CVE-2008-5784 V3 Chat - Profiles/Dating Script 3.0.2 allows remote attackers to bypass authentication and gain administrative access by setting the admin… vulnerability

Child of · CWE (1)

  • CWE-693 Protection Mechanism Failure weakness

Referenced by CVE · weakness (134)

  • CVE-2026-116016 yudao-cloud through 2026.09 contains an authorization bypass vulnerability that allows authenticated users to evade row-level data scope… vulnerability
  • CVE-2026-114617 Authlib is a Python library which builds OAuth and OpenID Connect servers. vulnerability
  • CVE-2026-50106 When NLnet Labs Unbound up to and including version 1.26.1 is configured with both a root trust anchor and an additional 'trust-anchor:'… vulnerability
  • CVE-2026-111748 AIOHTTP is an asynchronous HTTP client/server framework for asyncio and Python. vulnerability
  • CVE-2026-111869 A vulnerability was identified in makeplane plane up to 1.4.2. vulnerability
  • CVE-2026-108433 Reliance on untrusted inputs in a security decision in Microsoft Office Word allows an unauthorized attacker to bypass a security feature… vulnerability
  • CVE-2026-110726 In `api-gateway` versions till `1.7.3`, The default rate-limit key resolver, `ClientIpKeyResolver`, derives the per-client bucket key from… vulnerability
  • CVE-2026-53614 util-linux is a random collection of Linux utilities. vulnerability
  • CVE-2026-66874 For pull request events, Gitea reads workflow definitions from the pull request head and posts a synthetic skipped status when workflow… vulnerability
  • CVE-2026-102234 Reliance on untrusted inputs in a security decision in Visual Studio Code allows an unauthorized attacker to bypass a security feature over… vulnerability
  • CVE-2026-105458 GitLab has remediated an issue in GitLab EE affecting all versions from 19.1 before 19.2.8, 19.3 before 19.3.5, and 19.4 before 19.4.2… vulnerability
  • CVE-2026-83522 Reliance on untrusted inputs in a security decision in Windows IKE Extension allows an unauthorized attacker to perform spoofing over a… vulnerability
  • CVE-2026-85817 Reliance on untrusted inputs in a security decision in Windows PowerShell allows an unauthorized attacker to execute code over a network. vulnerability
  • CVE-2026-88210 Reliance on untrusted inputs in a security decision in Microsoft Office Word allows an unauthorized attacker to bypass a security feature… vulnerability
  • CVE-2026-96251 Reliance on untrusted inputs in a security decision in Microsoft PowerShell allows an unauthorized attacker to execute code over a network. vulnerability
  • CVE-2026-108903 pH7Builder (pH7 Social Dating CMS) before 19.3.0 contains a CAPTCHA bypass vulnerability that allows unauthenticated attackers to skip form… vulnerability
  • CVE-2026-104658 The Linux live-update apply helper (hmailserver-update) of Progressive Robot hMailServer 6.3.4 and 6.3.5 runs as root on a request file… vulnerability
  • CVE-2026-103267 Ghost versions before 6.62.0 contain an authentication bypass vulnerability in staff invite acceptance that allows users to specify any… vulnerability
  • CVE-2026-103923 KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web. vulnerability
  • CVE-2026-76147 A path traversal (ZIP Slip) vulnerability caused by insufficient authorization and integrity verification in the agent upgrade feature of… vulnerability
  • CVE-2026-102117 On deployments where the remote-support capability is licensed and enabled, an authenticated System Administrator who also possessed the… vulnerability
  • CVE-2026-101079 A vulnerability was found in agentverus agentverus-scanner up to 0.8.1. vulnerability
  • CVE-2026-101131 A vulnerability was identified in deepseek-ai deepseek-harness up to 0.1.5-rc.3. vulnerability
  • CVE-2026-94606 authentik is an open-source identity provider. vulnerability
  • CVE-2026-84474 A flaw was found in Red Hat Ansible Automation Platform's automation- controller. vulnerability
  • CVE-2026-56681 9Router is an AI router & token saver. vulnerability
  • CVE-2026-56682 9Router is an AI router & token saver. vulnerability
  • CVE-2026-85751 Mailu is a mail server distributed as a set of Docker images. vulnerability
  • CVE-2026-87858 Temporal Server decided whether a Workflow completion callback was internal by reading a caller-supplied HTTP header. vulnerability
  • CVE-2026-81179 SysReptor is a fully customizable pentest reporting platform. vulnerability
Show all 134 ›

Referenced by CWE · child of (3)

  • CWE-302 Authentication Bypass by Assumed-Immutable Data weakness
  • CWE-350 Reliance on Reverse DNS Resolution for a Security-Critical Action weakness
  • CWE-784 Reliance on Cookies without Validation and Integrity Checking in a Security Decision weakness

Referenced by CWE · has member (1)

Referenced by OWASP · mapped cwe (2)