
Solr ConfigAPI add-listener reaches RunExecutableListener for RCE. Fixed in 7.1. Differential: listener added on vuln, refused on fixed

Scanner de vulnerabilidades rápido baseado em YAML, com motor de detecção orientado por templates para testes de segurança automatizados em aplicações web, APIs, redes, DNS e infraestrutura em nuvem.

Scanner de segurança de aplicações web de código aberto para detecção automatizada de vulnerabilidades, testes de penetração manuais e testes de segurança de API com um motor de intercepção baseado em proxy.

| CVE | CVE-2017-12629 |
| Component | Apache Solr — ConfigAPI add-listener |
| Affected | before Solr 7.1 with Lucene before 7.1 |
| Fixed in | Solr 7.1 / Lucene 7.1 |
| CWE | CWE-611 (XXE) leading to code execution |
| Impact | An XXE in configuration parsing combined with a ConfigAPI add-listener command could reach RunExecutableListener and execute an arbitrary command. |
| Vector | crafted config add-listener request |
| Trigger | RunExecutableListener class named in the request |
The vulnerable path:
# pre-fix (model from Apache Solr security bulletin)
attacker input accepted without the required protection
The derived guard:
# derived from observed behaviour, not copied from a vendor fix
block executable listener classes via ConfigAPI
The ConfigAPI allowed arbitrary listener classes. The fix blocks executable listeners.
| service | image | role |
|---|---|---|
s29-vuln | cve-2017-12629:vuln | vulnerable behaviour present |
s29-guard | cve-2017-12629:guard | fixed behaviour |
poc | cve-2017-12629-poc:local | stdlib-only Python driver |
Both sides are Python 3.12 images. The vulnerable behaviour is modelled from Apache Solr security bulletin; the guard is derived from the lab observation that the impact is reproduced. The fixed build applies the published upstream change.
./run-lab.sh build
./run-lab.sh up
./run-lab.sh sweep
./run-lab.sh down
The lab uses the isolated cve12629lab network and bounded containers.
poc/poc.py takes a mode and an optional --host=...:
| mode | result |
|---|---|
check | exit 1 when the listener executes, 0 when the listener is refused |
exploit | runs the full chain and reports the observed impact |
probe | prints the rce flag |
mitigation | explains the derived guard |
A standalone exploit ships at exploit/exploit.py:
python3 exploit/exploit.py --host=s29-vuln
It exits 1 on a confirmed finding and 0 on a guarded target.
s29-vuln (pre-fix) | s29-guard (derived) | |
|---|---|---|
| crafted request | RCE | refused |
| ordinary request | works | works |
Captured runs are in evidence/check-*-run.txt, evidence/exploit-*-run.txt,
evidence/probe-*-run.txt, evidence/mitigation-*-run.txt,
evidence/exploit-standalone-run.txt,
evidence/exploit-standalone-fixed-run.txt, evidence/versions.txt and
evidence/0day-sweep.txt.
Podman or Docker with the cve12629lab network. No production system is
involved. Real-world exploitation needs an affected installation.
Ordinary requests still succeed on the fixed build.
README.md this write-up
run-lab.sh environment driver (build / up / sweep / down)
Makefile convenience targets
poc/poc.py the PoC (check / exploit / probe / mitigation)
exploit/exploit.py standalone exploit
lab/harness-*.py vulnerable behaviour / derived guard
lab/lab.Dockerfile builds both sides
lab/service.py HTTP wrapper (POST /check)
evidence/ captured runs on both sides
TRACKING.md working record, excluded from the repo
Este repositório contém o componente scanner da Greenbone Community Edition.