Skip to content
RCE Disclosed report Intermediate CVE-2023-25693

RCE vulnerability in apache-airflow-providers-apache-sqoop 3.1.0

The Sqoop provider in Apache Airflow allowed a user to control the -libjars option through the connection's libjars setting, which could load a malicious JAR and execute arbitrary system commands on the machine running the MapReduce task. An attacker with the ability to set that connection field could achieve remote code execution.

leixiao Follow

Originally disclosed on HackerOne

Bounty$2,400 Medium View original
  • Triaged in 4 days
  • Fixed in 14 days
  • Paid in 14 days
  • Disclosed after 14 days

Summary by the program

CVE-2023-25693: Sqoop Apache Airflow Provider Remote Code Execution Vulnerability Severity: moderate

Description: Improper Input Validation vulnerability in the Apache Airflow Sqoop Provider.

This issue affects Apache Airflow Sqoop Provider versions before 3.1.1.

Credit:

L3yx of Syclover Security Team (finder)

Full Security Advisory: https://lists.apache.org/thread/79qn8g5xbq036f8crb115obvr22l52q4

The report

In airflow.providers.apache.sqoop.hooks.sqoop.SqoopHook._prepare_command, users can control -libjars through libjars in Connection. -libjars makes sure each MR task gets these jars in classpath, So I can set this as a malicious Jar package, causing arbitrary system commands to be executed on the machine performing the MR task.

This is a screenshot of my email reporting this vulnerability ██████████

Impact

Remote Code Execution

The original report as published on HackerOne, by leixiao. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the Sqoop hook passed a user-controlled connection field directly into the -libjars command-line option without validation, allowing a malicious JAR to be loaded and executed.

Impact

An attacker who can set the libjars field could execute arbitrary system commands on the machine performing the MapReduce task.

What the attacker needed

Ability to set libjars in a connection

The fix

The issue affects versions before 3.1.1, implying 3.1.1 is the fixed version.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Apache Airflow is a tool for scheduling data jobs, and its Sqoop provider lets those jobs talk to Sqoop, which runs MapReduce tasks. A setting called libjars tells those tasks which extra Java libraries to load, and because a user could put their own file there, they could make the system run their code. That is remote code execution: running your own commands on someone else's machine.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by leixiao

View all

4 more disclosed reports, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.