---
title: "CWE-580: clone() Method Without super.clone()"
url: https://radicalnotion.ai/cwe/cwe-580
type: cwe
description: "The product contains a clone() method that does not call super.clone() to obtain the new object."
updated: 2026-11-10
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CWE-580: clone() Method Without super.clone()

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

## Description

The product contains a clone() method that does not call super.clone() to obtain the new object.

## Modes of introduction

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

## Applicable platforms

**Languages:** Java (Undetermined)

## Common consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Integrity, Other | Unexpected State, Quality Degradation | If a class does not follow this convention, a subclass's clone() method will return an object of the wrong type. |

## Potential mitigations

### Implementation

All implementations of clone() should obtain the new object by calling super.clone().

### Implementation

In some cases, you can eliminate the clone method altogether and use copy constructors.

## 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

The following two classes demonstrate a bug introduced by not calling super.clone(). Because of the way Kibitzer implements clone(), FancyKibitzer's clone method will return an object of type Kibitzer instead of FancyKibitzer.

Bad code:

```java
public class Kibitzer {
    public Object clone() throws CloneNotSupportedException {

        Object returnMe = new Kibitzer();
        ...
    }
}

public class FancyKibitzer extends Kibitzer{
    public Object clone() throws CloneNotSupportedException {

        Object returnMe = super.clone();
        ...
    }
}
```

## Related weaknesses

| Relationship | CWE | Name |
| --- | --- | --- |
| Parent | [CWE-573](https://radicalnotion.ai/cwe/cwe-573) | Improper Following of Specification by Caller |
| Parent | [CWE-664](https://radicalnotion.ai/cwe/cwe-664) | Improper Control of a Resource Through its Lifetime |

## Taxonomy mappings

| Taxonomy | Entry | Id | Fit |
| --- | --- | --- | --- |
| Software Fault Patterns | Unexpected access points | SFP28 | - |

## Frequently asked questions

### What is CWE-580?

The product contains a clone() method that does not call super.clone() to obtain the new object.

### How do you prevent CWE-580?

All implementations of clone() should obtain the new object by calling super.clone().

### How is CWE-580 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-580?

Exploiting CWE-580 can lead to: Unexpected State, Quality Degradation.

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

---

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