---
id: "CVE-2026-71253"
kind: "vulnerability"
aliases: ["CVE-2026-71253"]
title: "Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') vulnerability in Apache Johnzon"
severity: "critical"
cvss: 9.8
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["apache-johnzon", "java", "json-parsing", "package"]
not_affected_if: ["affected-version-not-present", "not-using-johnzon"]
published_at: "2026-10-19T11:17:18+00:00"
first_seen_at: "2026-10-23T21:57:17+00:00"
updated_at: "2026-10-23T22:28:56+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-71253", "first_seen_at": "2026-10-23T21:57:17+00:00"}]
---

# Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') vulnerability in Apache Johnzon

Apache Johnzon, a Java JSON library, has an unsafe reflection flaw where its ClassConverter loads and static-initializes a class whose name comes from untrusted JSON. An attacker who can supply JSON to an application that parses it with Johnzon can trigger code execution through class static initializers.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

Find Apache Johnzon in the project dependencies (for example johnzon-core in pom.xml or build.gradle) and check the version.

## Fix

Upgrade Apache Johnzon to 1.3.1 (javax namespace) or 2.2.0 (jakarta namespace), as the sources recommend.

## Timeline

- 2026-10-23T21:57:17+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-71253

## From the sources

Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') vulnerability in Apache Johnzon.



ClassConverter loads & static-initializes an attacker-named class from untrusted JSON.




This issue affects Apache Johnzon: from 1.0.0 before 2.2.0.



Users are recommended to upgrade to version 1.3.1 (javax namespace) or 2.2.0 (jakarta specification namespace), which fixes the issue.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
