CWE-1046: Creation of Immutable Text Using String Concatenation
The product creates an immutable text string using string concatenation operations.
Last updated
Overview
CWE-1046 (Creation of Immutable Text Using String Concatenation) is a base-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Real-world CVEs
1 recorded CVE is caused by CWE-1046 (Creation of Immutable Text Using String Concatenation). 1 new CWE-1046 CVE has been recorded so far in 2026.
Common consequences
What can happen when CWE-1046 is exploited.
Reduce Performance
Affects: Other
When building a string via a looping feature (e.g., a FOR or WHILE loop), the use of += to append to the existing string will result in the creation of a new object with each iteration, which can be inefficient in comparison with use of text buffer data elements. This issue can make the product perform more slowly. If the relevant code is reachable by an attacker, then this could be influenced to create performance problems.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.