// For flags

CVE-2023-50386

Apache Solr: Backup/Restore APIs allow for deployment of executables in malicious ConfigSets

Severity Score

8.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track*
*SSVC
Descriptions

Improper Control of Dynamically-Managed Code Resources, Unrestricted Upload of File with Dangerous Type, Inclusion of Functionality from Untrusted Control Sphere vulnerability in Apache Solr.This issue affects Apache Solr: from 6.0.0 through 8.11.2, from 9.0.0 before 9.4.1.

In the affected versions, Solr ConfigSets accepted Java jar and class files to be uploaded through the ConfigSets API.
When backing up Solr Collections, these configSet files would be saved to disk when using the LocalFileSystemRepository (the default for backups).
If the backup was saved to a directory that Solr uses in its ClassPath/ClassLoaders, then the jar and class files would be available to use with any ConfigSet, trusted or untrusted.

When Solr is run in a secure way (Authorization enabled), as is strongly suggested, this vulnerability is limited to extending the Backup permissions with the ability to add libraries.
Users are recommended to upgrade to version 8.11.3 or 9.4.1, which fix the issue.
In these versions, the following protections have been added:

* Users are no longer able to upload files to a configSet that could be executed via a Java ClassLoader.
* The Backup API restricts saving backups to directories that are used in the ClassLoader.

Control inadecuado de recursos de código administrados dinámicamente, carga sin restricciones de archivos con tipos peligrosos, inclusión de funcionalidad de vulnerabilidad de esfera de control no confiable en Apache Solr. Este problema afecta a Apache Solr: desde 6.0.0 hasta 8.11.2, desde 9.0.0 antes de 9.4 .1. En las versiones afectadas, Solr ConfigSets aceptó la carga de archivos jar y de clase de Java a través de la API de ConfigSets. Al realizar una copia de seguridad de las colecciones de Solr, estos archivos de configuración se guardarán en el disco cuando se utilice LocalFileSystemRepository (el valor predeterminado para las copias de seguridad). Si la copia de seguridad se guardó en un directorio que Solr usa en su ClassPath/ClassLoaders, entonces los archivos jar y de clase estarían disponibles para usar con cualquier ConfigSet, confiable o no confiable. Cuando Solr se ejecuta de forma segura (autorización habilitada), como se sugiere encarecidamente, esta vulnerabilidad se limita a ampliar los permisos de copia de seguridad con la capacidad de agregar librerías. Se recomienda a los usuarios actualizar a la versión 8.11.3 o 9.4.1, que soluciona el problema. En estas versiones, se han agregado las siguientes protecciones: * Los usuarios ya no pueden cargar archivos a un configSet que podría ejecutarse a través de un ClassLoader de Java. * La API de copia de seguridad restringe el almacenamiento de copias de seguridad en directorios que se utilizan en ClassLoader.

Apache Solr versions 6.0.0 through 8.11.2 and versions 9.0.0 up to 9.4.1 are affected by an unrestricted file upload vulnerability which can result in remote code execution in the context of the user running Apache Solr. When Apache Solr creates a Collection, it will use a specific directory as the classpath and load some classes from it. The backup function of the Collection can export malicious class files uploaded by attackers to the directory, allowing Solr to load custom classes and create arbitrary Java code. Execution can further bypass the Java sandbox configured by Solr, ultimately causing arbitrary command execution.

*Credits: L3yx
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:Track*
Exploitation
None
Automatable
No
Tech. Impact
Total
* Organization's Worst-case Scenario
Timeline
  • 2023-12-07 CVE Reserved
  • 2024-02-09 CVE Published
  • 2024-08-02 CVE Updated
  • 2024-10-08 EPSS Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-434: Unrestricted Upload of File with Dangerous Type
  • CWE-913: Improper Control of Dynamically-Managed Code Resources
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Apache
Search vendor "Apache"
Solr
Search vendor "Apache" for product "Solr"
>= 6.0.0 < 8.11.3
Search vendor "Apache" for product "Solr" and version " >= 6.0.0 < 8.11.3"
-
Affected
Apache
Search vendor "Apache"
Solr
Search vendor "Apache" for product "Solr"
>= 9.0.0 < 9.4.1
Search vendor "Apache" for product "Solr" and version " >= 9.0.0 < 9.4.1"
-
Affected