CVE
CVE-2026-86792
CWE
CWE-470
Affected Surface
- Apache Airflow deployments using `apache-airflow-providers-apache-kafka` versions `1.15.0` through before `2.0.0`
- Airflow schedulers with Kafka event publishing enabled through `dag_run_events_enabled` or `task_instance_events_enabled`
- Plain Kafka and Amazon MSK deployments that accept string-valued callbacks in Kafka connection extras
- Teams where connection editors are not supposed to gain scheduler-level code execution
apache-airflow-providers-apache-kafka does not sit on the edge of an Airflow deployment. It sits in the control plane: hooks, listeners, scheduler plugins, and broker client configuration. That is why CVE-2026-86792 deserves attention even though the upstream disclosure rates it moderate. The vulnerable path lets a user who can edit an Airflow Kafka connection push execution into the scheduler process, which is usually the boundary Airflow teams try hardest to protect.
The vulnerable window starts in 1.15.0, the 28 July 2026 release that added Kafka event publishing for DagRun and TaskInstance state changes. It closes in 2.0.0, released on 14 September 2026, which stops resolving string callbacks unless administrators explicitly allowlist them.
Affected package and deployment shape
The affected package is:
| Package | Affected versions | Fixed version |
|---|---|---|
apache-airflow-providers-apache-kafka | >=1.15.0, <2.0.0 | 2.0.0 |
The vulnerable condition is narrower than “Airflow has the provider installed,” but still easy to miss:
- the deployment uses
apache-airflow-providers-apache-kafkain the affected range dag_run_events_enabledortask_instance_events_enabledis enabled- a less trusted user can edit the Kafka connection’s
extraJSON - the deployment is using plain Kafka or Amazon MSK rather than Google Managed Kafka
Google Managed Kafka is called out as unaffected in the public advisory because that code path overwrites a user-supplied oauth_cb. Plain brokers and Amazon MSK do not get the same protection.
Root cause in the provider source
The vulnerable callback resolution path in 1.15.0 is short enough to fit on screen:
def _resolve_callbacks(self, config: dict[str, Any]) -> None:
"""Resolve callback options provided as dotted-path strings into callables."""
for key in CALLBACK_CONFIG_KEYS:
value = config.get(key)
if isinstance(value, str):
config[key] = import_string(value)
The important detail is not just that import_string() is used. It is used on values that come from the connection’s extra JSON, and the allowed keys include callback slots that confluent-kafka will later call:
CALLBACK_CONFIG_KEYS = (
"error_cb",
"throttle_cb",
"stats_cb",
"log_cb",
"oauth_cb",
"on_commit",
)
That means the connection record is not only carrying broker settings. It is selecting Python callables by dotted import path.
Why this reaches the scheduler
The public disclosure already states that the impact reaches the scheduler, but the control-plane path is worth spelling out because it explains why this is more serious than an ordinary connection-level bug.
Version 1.15.0 introduced the Kafka event producer plugin. When either event flag is enabled, the scheduler-side listener path starts building a Kafka producer:
def _produce_message(event: str, dag_id: str, run_id: str, payload: dict[str, Any]) -> None:
if not _dag_run_events_enabled() and not _task_instance_events_enabled():
return
if not _check_topic_exists():
return
producer = _get_producer()
That producer creation flows back through the Kafka hook, which reads the connection extras and resolves the callback strings before building the client configuration. So the execution chain is:
connection editor controls Kafka extra JSON
-> scheduler event listener asks for a producer
-> Kafka hook reads connection extras
-> _resolve_callbacks() calls import_string() on callback paths
-> confluent-kafka receives attacker-chosen callables in the scheduler process
In a legitimate deployment, a connection might carry a callback like this:
{
"bootstrap.servers": "broker.internal:9092",
"oauth_cb": "my_company.kafka.auth.oauth_cb"
}
That is exactly the problem. In the vulnerable versions, the provider trusted the dotted path without checking whether administrators had approved it. If a connection editor can point that field at an importable callable already present on the scheduler’s Python path, the callback selection boundary shifts from “admin-controlled code” to “connection-controlled code.”
What changed in 2.0.0
The 2.0.0 fix does not try to guess which callbacks are safe. It adds an explicit callback_allowlist and refuses everything else:
if not allowlist:
raise ValueError(
f"Refusing to resolve Kafka callback {key}={value!r}: "
f"the [apache_kafka] callback_allowlist is empty."
)
if value not in allowlist:
raise ValueError(
f"Refusing to resolve Kafka callback {key}={value!r}: "
f"it is not in the [apache_kafka] callback_allowlist."
)
config[key] = import_string(value)
The provider changelog also makes the behavioral change explicit:
librdkafka callbacks given as dotted-path strings on a Kafka connection extra
are no longer imported unless the full importable path of the callback is
listed in the new [apache_kafka] callback_allowlist option, which is empty by
default.
That is the right kind of fix for this class of bug. The package still supports string-valued callbacks, but only after an administrator has named the exact import path they intend to trust.
One upgrade detail matters operationally: the 2.0.0 provider docs say this release requires apache-airflow >= 2.11.0. Teams pinned to an older Airflow core may need a two-step remediation plan rather than a same-day single-package bump.
Scoping and detection
Start by checking whether the provider is installed and whether the vulnerable event path is actually enabled:
python3 -m pip show apache-airflow-providers-apache-kafka
airflow config get-value kafka_event_producer dag_run_events_enabled
airflow config get-value kafka_event_producer task_instance_events_enabled
Then inspect Kafka connection extras for the callback-bearing keys:
error_cb
throttle_cb
stats_cb
log_cb
oauth_cb
on_commit
If you export connections or manage them as code, search for those keys directly:
rg -n '"(error_cb|throttle_cb|stats_cb|log_cb|oauth_cb|on_commit)"' \
airflow.cfg connections.json dags/ infra/
The most important scoping question is not “do we use Kafka?” It is:
Can a user who is not supposed to control scheduler code
edit the Kafka connection extras that select callback paths?
If the answer is yes and the event producer is enabled, treat the deployment as exposed.
Remediation
The clean fix is to upgrade to apache-airflow-providers-apache-kafka==2.0.0 or later and set [apache_kafka] callback_allowlist to the exact callback paths you intend to trust.
If you cannot upgrade immediately:
- disable
dag_run_events_enabledandtask_instance_events_enabled - remove string-valued callback entries from Kafka connection extras
- restrict who can edit Airflow connections
- review whether any callback paths were recently changed in the metadata database, deployment manifests, or secrets backends
After the upgrade, avoid treating the allowlist as a convenience toggle. Keep it narrow. A short list of exact importable callback paths is the control that restores the intended trust boundary.
Incident response guidance
If the vulnerable provider path was enabled and untrusted users could edit the relevant connection:
- review Airflow connection change history and scheduler logs for Kafka producer failures or callback-related errors
- compare current connection extras against your expected infrastructure-as-code or secret-store state
- inspect the scheduler environment for unexpected packages or modules that could have provided an import target
- rotate credentials reachable from the scheduler if you find evidence that hostile callbacks were configured
apache-airflow-providers-apache-kafka is a small package, but it sits close to one of the highest-value processes in an Airflow deployment. CVE-2026-86792 matters because it turns a configuration record into a code-selection primitive inside the scheduler. That is a boundary AppSec teams should treat with the same care they apply to DAG upload or plugin deployment.
From research to remediation
Check whether this pattern exists in your codebase
Turn this research into a remediation workflow. Scan dependencies and package manifests for similar supply-chain risk, then prioritize fixes with reachability context.