---
title: "CWE-1109: Use of Same Variable for Multiple Purposes"
url: https://radicalnotion.ai/cwe/cwe-1109
type: cwe
description: "The code contains a callable, block, or other code element in which the same variable is used to control more than one unique task or store more than one instance of data."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-1109: Use of Same Variable for Multiple Purposes

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

## Description

The code contains a callable, block, or other code element in which the same variable is used to control more than one unique task or store more than one instance of data.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Implementation | - |

## Applicable platforms

**Languages:** Python (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Other | Reduce Maintainability | This issue makes it more difficult to maintain the product, which indirectly affects security by making it more difficult or time-consuming to find and/or fix vulnerabilities. It also might make it easier to introduce vulnerabilities. |
| Other | Increase Analytical Complexity | Use of the same variable for multiple purposes can make it more difficult for a person to read or understand the code, potentially hiding other quality issues. |

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2023-26463 | Chain: IPSec VPN product uses the same variable for multiple purposes in the same function (CWE-1109), leading to incorrect access control (CWE-284) and expired pointer dereference (CWE-825) |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-1078](https://radicalnotion.ai/cwe/cwe-1078) | Inappropriate Source Code Style or Formatting |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| OpenSSF Secure Coding Guide for Python | Avoid Redefining Built-in Functions or Standard Library Identifiers | pyscg-0032 | - |

## Frequently asked questions

### What is CWE-1109?

The code contains a callable, block, or other code element in which the same variable is used to control more than one unique task or store more than one instance of data.

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

Exploiting CWE-1109 can lead to: Reduce Maintainability, Increase Analytical Complexity.

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

---

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