CVE-2026-1225

Resource Injection
Affects
ch.qos.logback:logback-core
in
Logback
No items found.
Versions
<1.5.25

Patch Available.

Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

Logback is an open-source Java logging framework designed as a successor to Log4j. Its core module provides logging infrastructure, logback-classic implements the SLF4J API, and logback-access supplies HTTP access logging for servlet containers.

A resource injection vulnerability (CVE-2026-1225) has been identified in the configuration file processing of logback-core, which allows attackers who can write to an existing Logback configuration file to make Logback instantiate any class already present on the class path.

Per OWASP: This attack consists of changing resource identifiers used by an application in order to perform a malicious task. When an application defines a resource type or location based on user input, such as a file name or port number, this data can be manipulated to execute or access different resources.

This issue affects all versions of Logback prior to 1.5.25.

Details

Module Info

Vulnerability Info

This Low-severity vulnerability is found in the ch.qos.logback:logback-core package in all versions of Logback prior to 1.5.25. When Joran processes a configuration file, a nested element that maps to a complex property of its parent component (a setter such as setEncoder or an adder such as addAppender) may name its implementation in a class attribute. Logback loads that class and creates an instance of it without checking that the class is compatible with the parameter type the setter or adder expects. In the 1.2.x line this happens in NestedComplexPropertyIA.begin():

String className = attributes.getValue(CLASS_ATTRIBUTE);
// perform variable name substitution
className = ec.subst(className);

Class<?> componentClass = null;
try {
    if (!OptionHelper.isEmpty(className)) {
        componentClass = Loader.loadClass(className, context);
    } else {
        // guess class name via implicit rules
        ...
    }
    ...
    actionData.setNestedComplexProperty(componentClass.newInstance());

Because the constructor runs before Logback tries to pass the object to the setter or adder, any class on the class path with a public no-argument constructor is instantiated, and its constructor and static initializer execute, even when the object is of the wrong type. The type mismatch is only reported, as a configuration error, when Logback later tries to attach the object to its parent; before that, Logback hands the object its context if it is context-aware, applies any nested configuration elements to it, and starts it if it implements LifeCycle. An attacker who can modify a configuration file can use this to trigger the construction-time side effects of arbitrary classes already present on the class path. Exploitation requires write access to the configuration file and a suitable class on the application's class path.

Mitigation

Logback 1.2.x is End-of-Life and will not receive any updates to address this issue. For more information, see here.

Users of the affected components should apply one of the following mitigations:

  • Upgrade affected applications to a currently supported version of Logback.
  • Leverage a commercial support partner like HeroDevs for post-EOL security support.

Credits

  • Code Intelligence (finder)
  • Google Fuzz (finder)
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Low
ID
CVE-2026-1225
PROJECT Affected
ch.qos.logback:logback-core
Versions Affected
<1.5.25
NES Versions Affected
Published date
October 13, 2026
≈ Fix date
October 13, 2026
Category
Resource Injection
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for Logback
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.