---
title: "CWE-270: Privilege Context Switching Error"
url: https://radicalnotion.ai/cwe/cwe-270
type: cwe
description: "The product does not properly manage privileges while it is switching between different contexts that have different privileges or spheres of control."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-270: Privilege Context Switching Error

- **Abstraction:** Base
- **Structure:** Simple
- **Status:** Draft
- **CVEs with this as primary weakness:** 44
- **Of those, in CISA KEV:** 1
- **New in 2026:** 17
- **CWE catalog version:** 4.21

## Description

The product does not properly manage privileges while it is switching between different contexts that have different privileges or spheres of control.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | - |
| Implementation | REALIZATION: This weakness is caused during implementation of an architectural security tactic. |
| Operation | - |

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Access Control | Gain Privileges or Assume Identity | A user can assume the identity of another user with separate privileges in another context. This will give the user unauthorized access that may allow them to acquire the access information of other users. |

## Potential mitigations

### Architecture and Design, Operation

Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.

### Architecture and Design, Operation (Environment Hardening)

Run your code using the lowest privileges that are required to accomplish the necessary tasks \[REF-76\]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.

### Architecture and Design (Separation of Privilege)

Consider following the principle of separation of privilege. Require multiple conditions to be met before permitting access to a system resource.

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2002-1688 | Web browser cross domain problem when user hits "back" button. |
| CVE-2003-1026 | Web browser cross domain problem when user hits "back" button. |
| CVE-2002-1770 | Cross-domain issue - third party product passes code to web browser, which executes it in unsafe zone. |
| CVE-2005-2263 | Run callback in different security context after it has been changed from untrusted to trusted. \* note that "context switch before actions are completed" is one type of problem that happens frequently, espec. in browsers. |

## Real CVEs with this weakness (sample of 12 of 44)

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2021-3493 | Linux Kernel Privilege Escalation Vulnerability | critical | 9.3 | - | Yes | 2021-04-17 |
| CVE-2023-37912 | XWiki Rendering's footnote macro vulnerable to privilege escalation via the footnote macro | critical | 10.0 | - | No | 2023-10-25 |
| CVE-2023-26475 | XWiki Platform vulnerable to Remote Code Execution in Annotations | critical | 10.0 | - | No | 2023-03-02 |
| CVE-2017-10912 | xen: page transfer may allow PV guest to elevate privilege (XSA-217) | critical | 10.0 | - | No | 2017-07-05 |
| CVE-2024-11263 | arch: riscv: userspace: potential security risk when CONFIG\_RISCV\_GP=y | critical | 9.4 | - | No | 2024-11-15 |
| CVE-2023-25754 | Apache Airflow: Privilege escalation using airflow logs | critical | 9.3 | - | No | 2023-05-08 |
| CVE-2026-68457 | ksmbd: use opener credentials for FSCTL mutations | critical | 9.1 | - | No | 2026-08-15 |
| CVE-2026-64393 | ksmbd: run set info with opener credentials | critical | 9.1 | - | No | 2026-07-25 |
| CVE-2026-64392 | ksmbd: use opener credentials for delete-on-close | critical | 9.1 | - | No | 2026-07-25 |
| CVE-2026-88200 | Microsoft Office SharePoint Elevation of Privilege Vulnerability | high | 8.8 | - | No | 2026-10-13 |
| CVE-2026-4722 | Privilege escalation in the IPC component | high | 8.8 | - | No | 2026-03-24 |
| CVE-2024-36513 | - | high | 8.8 | - | No | 2024-11-12 |

## Related attack patterns (CAPEC)

- [CAPEC-17](https://radicalnotion.ai/capec/capec-17): Using Malicious Files
- [CAPEC-30](https://radicalnotion.ai/capec/capec-30): Hijacking a Privileged Thread of Execution
- [CAPEC-35](https://radicalnotion.ai/capec/capec-35): Leverage Executable Code in Non-Executable Files

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-269](https://radicalnotion.ai/cwe/cwe-269) | Improper Privilege Management |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| PLOVER | Privilege Context Switching Error | - | - |

## Frequently asked questions

### What is CWE-270?

The product does not properly manage privileges while it is switching between different contexts that have different privileges or spheres of control.

### What CVEs are caused by CWE-270?

44 recorded CVEs are attributed to CWE-270, including CVE-2021-3493, CVE-2023-37912 and CVE-2023-26475. 1 is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog.

### How do you prevent CWE-270?

Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.

### What are the consequences of CWE-270?

Exploiting CWE-270 can lead to: Gain Privileges or Assume Identity.

### Is CWE-270 actively exploited?

Yes. 1 CWE-270 vulnerability is in CISA's KEV catalog of actively exploited flaws, out of 44 recorded CVEs.

Primary source: [MITRE CWE](https://cwe.mitre.org/data/definitions/270.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/cwe/cwe-270). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
