---
title: "CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes"
url: https://radicalnotion.ai/cwe/cwe-915
type: cwe
description: "The product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-915: Improperly Controlled Modification of Dynamically-Determined Object Attributes

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

## Description

The product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified.

## Alternate terms

- **Mass Assignment:** "Mass assignment" is the name of a feature in Ruby on Rails that allows simultaneous modification of multiple object attributes.
- **AutoBinding:** The "Autobinding" term is used in frameworks such as Spring MVC and ASP.NET MVC.
- **PHP Object Injection:** Some PHP application researchers use this term for attacking unsafe use of the unserialize() function, but it is also used for CWE-502.

## Modes of introduction

| Phase | Note |
| --- | --- |
| Architecture and Design | - |
| Implementation | If an object contains attributes that were only intended for internal use, then their unexpected modification could lead to a vulnerability. |

## Applicable platforms

**Languages:** Ruby (Undetermined), ASP.NET (Undetermined), PHP (Undetermined), Python (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Integrity | Modify Application Data | An attacker could modify sensitive data or program variables. |
| Integrity | Execute Unauthorized Code or Commands | - |
| Other, Integrity | Varies by Context, Alter Execution Logic | - |

## Potential mitigations

### Implementation

If available, use features of the language or framework that allow specification of allowlists of attributes or fields that are allowed to be modified. If possible, prefer allowlists over denylists.

For applications written with Ruby on Rails, use the attr\_accessible (allowlist) or attr\_protected (denylist) macros in each class that may be used in mass assignment.

### Architecture and Design, Implementation

If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.

### Implementation (Input Validation)

For any externally-influenced input, check the input against an allowlist of internal object attributes or fields that are allowed to be modified.

### Implementation, Architecture and Design (Refactoring)

Refactor the code so that object attributes or fields do not need to be dynamically identified, and only expose getter/setter functionality for the intended attributes.

## Detection methods

### Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Effectiveness: High

## Demonstrative examples

### Example 1

This function sets object attributes based on a dot-separated path.

Bad code:

```javascript
function setValueByPath (object, path, value) {
    const pathArray = path.split(".");
    const attributeToSet = pathArray.pop();
    let objectToModify = object;
    for (const attr of pathArray) {
        if (typeof objectToModify[attr] !== 'object') {
            objectToModify[attr] = {};
            }

        objectToModify = objectToModify[attr];
        }

    objectToModify[attributeToSet] = value;
    return object;
    }
```

Bad code:

```javascript
setValueByPath({}, "__proto__.isAdmin", true)
setValueByPath({}, "constructor.prototype.isAdmin", true)
```

Good code:

```javascript
function setValueByPath (object, path, value) {
    const pathArray = path.split(".");
    const attributeToSet = pathArray.pop();
    let objectToModify = object;
    for (const attr of pathArray) {
        // Ignore attributes which resolve to object prototype
        if (attr === "__proto__" || attr === "constructor" || attr === "prototype") {
            continue;
            }
        if (typeof objectToModify[attr] !== "object") {
            objectToModify[attr] = {};
            }
        objectToModify = objectToModify[attr];
        }
    objectToModify[attributeToSet] = value;
    return object;
    }
```

## Observed examples

| CVE | Description |
| --- | --- |
| CVE-2024-3283 | Application for using LLMs allows modification of a sensitive variable using mass assignment. |
| CVE-2012-2054 | Mass assignment allows modification of arbitrary attributes using modified URL. |
| CVE-2012-2055 | Source version control product allows modification of trusted key using mass assignment. |
| CVE-2008-7310 | Attackers can bypass payment step in e-commerce product. |
| CVE-2013-1465 | Use of PHP unserialize function on untrusted input allows attacker to modify application configuration. |
| CVE-2012-3527 | Use of PHP unserialize function on untrusted input in content management system might allow code execution. |
| CVE-2012-0911 | PHP-based content management system written in PHP uses unserialize function on untrusted input to generate arbitrary objects, possibly allowing code execution. |
| CVE-2011-4962 | Content management system written in PHP allows code execution through page comments. |
| CVE-2009-4137 | Use of PHP unserialize function on cookie value allows remote code execution or upload of arbitrary files. |
| CVE-2007-5741 | Content management system written in Python interprets untrusted data as pickles, allowing code execution. |
| CVE-2011-2520 | Python script allows local users to execute code via pickled data. |
| CVE-2005-2875 | Python script allows remote attackers to execute arbitrary code using pickled objects. |
| CVE-2013-0277 | Ruby on Rails allows deserialization of untrusted YAML to execute arbitrary code. |
| CVE-2011-2894 | Spring framework allows deserialization of objects from untrusted sources to execute arbitrary code. |
| CVE-2012-1833 | Grails allows binding of arbitrary parameters to modify arbitrary object properties. |
| CVE-2010-3258 | Incorrect deserialization in web browser allows escaping the sandbox. |
| CVE-2008-1013 | Media library allows deserialization of objects by untrusted Java applets, leading to arbitrary code execution. |

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

| CVE | Title | Severity | CVSS | EPSS | CISA KEV | Published |
| --- | --- | --- | --- | --- | --- | --- |
| CVE-2026-50160 | Mass Assignment via Onboarding Endpoint Allows Unauthenticated JWT\_SECRET Overwrite | critical | 10.0 | - | No | 2026-07-01 |
| CVE-2026-33453 | Apache Camel: CoAP URI Query Parameter to Exchange Header Injection in camel-coap Allows Single-Packet Pre-Auth Remote Code Execution | critical | 10.0 | - | No | 2026-04-27 |
| CVE-2025-58367 | DeepDiff is vulnerable to DoS and Remote Code Execution via Delta class pollution | critical | 10.0 | - | No | 2025-09-05 |
| CVE-2020-11066 | Improperly Controlled Modification of Dynamically-Determined Object Attributes in TYPO3 CMS | critical | 10.0 | - | No | 2020-05-13 |
| CVE-2026-17117 | Multiple Vulnerabilities in IBM API Connect | critical | 9.9 | - | No | 2026-11-07 |
| CVE-2026-107249 | Block AJAX - Highly critical - PHP object injection - SA-CONTRIB-2026-192 | critical | 9.8 | - | No | 2026-10-30 |
| CVE-2026-72207 | ntfs: not change 0-byte $DATA attribute to non-resident | critical | 9.8 | - | No | 2026-08-15 |
| CVE-2026-12535 | Formatter Field - Critical - PHP object injection - SA-CONTRIB-2026-048 | critical | 9.8 | - | No | 2026-07-10 |
| CVE-2026-9726 | Drupal AlternativeCommerce (Basket) - Highly critical - Arbitrary PHP code execution - SA-CONTRIB-2026-038 | critical | 9.8 | - | No | 2026-07-10 |
| CVE-2026-27953 | ormar has a Pydantic Validation Bypass via Kwargs Injection in Model Constructor | critical | 9.8 | - | No | 2026-03-19 |
| CVE-2024-5452 | RCE via Property/Class Pollution in lightning-ai/pytorch-lightning | critical | 9.8 | - | No | 2024-06-06 |
| CVE-2022-43441 | sqlite vulnerable to code execution due to Object coercion | critical | 9.8 | - | No | 2023-03-16 |

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-913](https://radicalnotion.ai/cwe/cwe-913) | Improper Control of Dynamically-Managed Code Resources |
| Child | [CWE-1321](https://radicalnotion.ai/cwe/cwe-1321) | Improperly Controlled Modification of Object Prototype Attributes |
| Peer | [CWE-502](https://radicalnotion.ai/cwe/cwe-502) | Deserialization of Untrusted Data |

## Frequently asked questions

### What is CWE-915?

The product receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified.

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

167 recorded CVEs are attributed to CWE-915, including CVE-2026-50160, CVE-2026-33453 and CVE-2025-58367.

### How do you prevent CWE-915?

If available, use features of the language or framework that allow specification of allowlists of attributes or fields that are allowed to be modified. If possible, prefer allowlists over denylists.

### How is CWE-915 detected?

Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

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

Exploiting CWE-915 can lead to: Modify Application Data, Execute Unauthorized Code or Commands, Varies by Context, Alter Execution Logic.

### Is CWE-915 actively exploited?

167 recorded CVEs are caused by CWE-915; none are currently in CISA's KEV catalog of actively exploited flaws.

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

---

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