CWE-1046

Base Abstraction Level
Pillar — Highest-level weakness category
Class — Abstract, language-independent
Base — Specific enough to detect
Variant — Tied to specific technology
Compound — Requires multiple weaknesses
Incomplete MITRE CWE Status
Stable — Fully reviewed and complete
Draft — Under development, may change
Incomplete — Partially defined by MITRE
Deprecated — No longer recommended
Obsolete — Replaced by another CWE
Creation of Immutable Text Using String Concatenation

Description

The product creates an immutable text string using string concatenation operations.

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.

Consequences

Other — Reduce Performance

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 problem.