{"answers":{"affected":"3 open source packages ship an affected version, including apache-airflow-providers-apache-spark. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-40195 in the wild and no public exploit code.","fix":"Upgrade apache-airflow-providers-apache-spark to 4.1.3 or later.","what":"CVE-2023-40195 is a high-severity unsafe deserialization vulnerability in Apache Airflow Spark Provider, published on 28 Aug 2023. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-40195 and fix it if it is affected.\n\nWhat it is: CVE-2023-40195 is a high-severity unsafe deserialization vulnerability in Apache Airflow Spark Provider, published on 28 Aug 2023. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-40195 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- apache-airflow-providers-apache-spark (PyPI): affected all versions; fixed in 4.1.3\n- apache-airflow-providers-apache-spark (PyPI): affected all versions; fixed in 4.1.3\n- apache-airflow-providers-apache-spark (PyPI): affected all versions; fixed in 4.1.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-40195/ (Markdown: https://insights.sbomify.com/CVE-2023-40195/index.md)","id":"CVE-2023-40195","markdown":"https://insights.sbomify.com/CVE-2023-40195/index.md","name":"CVE-2023-40195","record":{"aliases":["GHSA-8q28-pw9g-w82c","PYSEC-2023-156"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"Apache Airflow Spark Provider","requires_auth":"low_privilege","summary":"Authorized users can execute arbitrary code on Airflow nodes by configuring Spark hooks to connect to malicious servers.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"apache","cpe":[{"product":"airflow_spark_provider","vendor":"apache"}],"cvss":{"score":8.8,"severity":"high","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-829","name":"Inclusion of Functionality from Untrusted Control Sphere"},{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"description":"Deserialization of Untrusted Data, Inclusion of Functionality from Untrusted Control Sphere vulnerability in Apache Software Foundation Apache Airflow Spark Provider.\n\nWhen the Apache Spark provider is installed on an Airflow deployment, an Airflow user that is authorized to configure Spark hooks can effectively run arbitrary code on the Airflow node by pointing it at a malicious Spark server. Prior to version 4.1.3, this was not called out in the documentation explicitly, so it is possible that administrators provided authorizations to configure Spark hooks without taking this into account. We recommend administrators to review their configurations to make sure the authorization to configure Spark hooks is only provided to fully trusted users.\n\nTo view the warning in the docs please visit  https://airflow.apache.org/docs/apache-airflow-providers-apache-spark/4.1.3/connections/spark.html","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Apache Airflow Spark Provider Deserialization Vulnerability RCE","id":"CVE-2023-40195","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"deserialization","year":"2023"},"n_packages":3,"n_references":2,"next":{"headline":"WordPress ImageRecycle pdf \u0026 image compression Plugin \u003c= 3.1.11 is vulnerable to Cross Site Scripting (XSS)","id":"CVE-2023-40196"},"packages":[{"ecosystem":"PyPI","fixed":["4.1.3"],"introduced":["0"],"last_affected":[],"package":"apache-airflow-providers-apache-spark","purl":null,"source":"GHSA-8q28-pw9g-w82c"},{"ecosystem":"PyPI","fixed":["4.1.3"],"introduced":["0"],"last_affected":[],"package":"apache-airflow-providers-apache-spark","purl":"pkg:pypi/apache-airflow-providers-apache-spark","source":"GHSA-8q28-pw9g-w82c"},{"ecosystem":"PyPI","fixed":["4.1.3"],"introduced":["0"],"last_affected":[],"package":"apache-airflow-providers-apache-spark","purl":"pkg:pypi/apache-airflow-providers-apache-spark","source":"PYSEC-2023-156"}],"prev":{"headline":"Path traversal in Foxit Reader","id":"CVE-2023-40194"},"products":["Apache Airflow Spark Provider"],"published":"2023-08-28","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["Apache Software Foundation"]},"summary":"Authorized users can execute arbitrary code on Airflow nodes by configuring Spark hooks to connect to malicious servers.","url":"https://insights.sbomify.com/CVE-2023-40195/"}