{"answers":{"affected":"13 open source packages ship an affected version, including drupal/core and drupal/drupal. It affects 1 product.","exploited":"Yes. Attackers have exploited CVE-2019-6340 in the wild since at least 25 Mar 2022.","fix":"Upgrade drupal/core to a fixed version for your release line: 7.62.0, 8.5.11 or 8.6.10. US federal agencies must fix it by 15 Apr 2022.","what":"CVE-2019-6340 is a high-severity unsafe deserialization vulnerability in Drupal Drupal, published on 21 Feb 2019. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2019-6340 and fix it if it is affected.\n\nWhat it is: CVE-2019-6340 is a high-severity unsafe deserialization vulnerability in Drupal Drupal, published on 21 Feb 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: Yes. Attackers have exploited CVE-2019-6340 in the wild since at least 25 Mar 2022.\n\nAffected packages and fixed versions:\n- drupal/core (Packagist): affected from 7.0.0; fixed in 7.62.0\n- drupal/core (Packagist): affected from 7.0.0; fixed in 7.62.0\n- drupal/core (Packagist): affected from 8.0.0; fixed in 8.5.11, 8.6.10\n- drupal/core (Packagist): affected from 8.0.0; fixed in 8.5.11\n- drupal/core (Packagist): affected from 8.0.0; fixed in 8.5.11\n- drupal/core (Packagist): affected from 8.6.0; fixed in 8.6.10\n- drupal/core (Packagist): affected from 8.6.0; fixed in 8.6.10\n- drupal/drupal (Packagist): affected from 7.0.0; fixed in 7.62.0\n- drupal/drupal (Packagist): affected from 7.0.0; fixed in 7.62.0\n- drupal/drupal (Packagist): affected from 8.0.0; fixed in 8.5.11\n- drupal/drupal (Packagist): affected from 8.0.0; fixed in 8.5.11\n- drupal/drupal (Packagist): affected from 8.6.0; fixed in 8.6.10\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-2019-6340/ (Markdown: https://insights.sbomify.com/CVE-2019-6340/index.md)","id":"CVE-2019-6340","markdown":"https://insights.sbomify.com/CVE-2019-6340/index.md","name":"CVE-2019-6340","record":{"aliases":["DRUPAL-CORE-2019-003","GHSA-3gx6-h57h-rm27"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"Drupal core","requires_auth":"none","summary":"Remote attackers can execute arbitrary PHP code via unsanitized data in specific field types when web services modules are enabled.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"drupal","cpe":[{"product":"drupal","vendor":"drupal"}],"cvss":{"score":8.1,"severity":"high","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"description":"Some field types do not properly sanitize data from non-form sources in Drupal 8.5.x before 8.5.11 and Drupal 8.6.x before 8.6.10. This can lead to arbitrary PHP code execution in some cases. A site is only affected by this if one of the following conditions is met: The site has the Drupal 8 core RESTful Web Services (rest) module enabled and allows PATCH or POST requests, or the site has another web services module enabled, like JSON:API in Drupal 8, or Services or RESTful Web Services in Drupal 7. (Note: The Drupal 7 Services module itself does not require an update at this time, but you should apply other contributed updates associated with this advisory if Services is in use.)","ecosystems":["Packagist"],"exploits":{"exploitdb":4,"first_seen":"2019-02-20","github_poc":11,"max_poc_stars":71,"metasploit":1,"nuclei":1,"refs":[{"date":"2019-05-27T19:06:14Z","kind":"github_poc","ref":"https://github.com/jas502n/CVE-2019-6340","stars":71,"title":"Drupal8's REST RCE, SA-CORE-2019-003, CVE-2019-6340"},{"date":"2019-02-23T13:28:58Z","kind":"github_poc","ref":"https://github.com/knqyf263/CVE-2019-6340","stars":42,"title":"Environment for CVE-2019-6340 (Drupal)"},{"date":"2019-02-22T16:03:40Z","kind":"github_poc","ref":"https://github.com/g0rx/Drupal-SA-CORE-2019-003","stars":30,"title":"CVE-2019-6340-Drupal SA-CORE-2019-003"},{"date":"2019-02-25T07:47:16Z","kind":"github_poc","ref":"https://github.com/oways/CVE-2019-6340","stars":11,"title":"CVE-2019-6340 POC Drupal rce"},{"date":"2020-08-31T22:55:18Z","kind":"github_poc","ref":"https://github.com/ludy-dev/drupal8-REST-RCE","stars":4,"title":"(CVE-2019-6340, CVE-2018-7600) drupal8-REST-RCE "},{"date":"2019-02-25T03:38:47Z","kind":"github_poc","ref":"https://github.com/DevDungeon/CVE-2019-6340-Drupal-8.6.9-REST-Auth-Bypass","stars":2,"title":"CVE-2019-6340 Drupal 8.6.9 REST Auth Bypass examples"},{"date":"2019-02-20","kind":"metasploit","ref":"exploit/unix/webapp/drupal_restws_unserialize","stars":null,"title":"Drupal RESTful Web Services unserialize() RCE"},{"date":"2019-02-23","kind":"exploitdb","ref":"46452","stars":null,"title":"Drupal \u003c 8.6.10 / \u003c 8.5.11 - REST Module Remote Code Execution"}],"tier":"exploited"},"has_fix":true,"headline":"Drupal Core Remote Code Execution","id":"CVE-2019-6340","indexable":true,"kev":{"dateAdded":"2022-03-25","dueDate":"2022-04-15","knownRansomwareCampaignUse":"Unknown","product":"Core","requiredAction":"Apply updates per vendor instructions.","vendorProject":"Drupal","vulnerabilityName":"Drupal Core Remote Code Execution Vulnerability"},"kind":"cve","links":{"ecosystem":"Packagist","product":"drupal:drupal","products":["drupal:drupal"],"type":"deserialization","year":"2019"},"n_packages":13,"n_references":6,"next":{"headline":"Drupal core - Moderately critical - Cross Site Scripting - SA-CORE-2019-004","id":"CVE-2019-6341"},"packages":[{"ecosystem":"Packagist","fixed":["7.62.0"],"introduced":["7.0.0"],"last_affected":[],"package":"drupal/core","purl":null,"source":"GHSA-3gx6-h57h-rm27"},{"ecosystem":"Packagist","fixed":["7.62.0"],"introduced":["7.0.0"],"last_affected":[],"package":"drupal/core","purl":"pkg:composer/drupal/core","source":"GHSA-3gx6-h57h-rm27"},{"ecosystem":"Packagist","fixed":["8.5.11","8.6.10"],"introduced":["8.0.0","8.6.0"],"last_affected":[],"package":"drupal/core","purl":"pkg:composer/drupal/core","source":"DRUPAL-CORE-2019-003"},{"ecosystem":"Packagist","fixed":["8.5.11"],"introduced":["8.0.0"],"last_affected":[],"package":"drupal/core","purl":null,"source":"GHSA-3gx6-h57h-rm27"},{"ecosystem":"Packagist","fixed":["8.5.11"],"introduced":["8.0.0"],"last_affected":[],"package":"drupal/core","purl":"pkg:composer/drupal/core","source":"GHSA-3gx6-h57h-rm27"},{"ecosystem":"Packagist","fixed":["8.6.10"],"introduced":["8.6.0"],"last_affected":[],"package":"drupal/core","purl":null,"source":"GHSA-3gx6-h57h-rm27"},{"ecosystem":"Packagist","fixed":["8.6.10"],"introduced":["8.6.0"],"last_affected":[],"package":"drupal/core","purl":"pkg:composer/drupal/core","source":"GHSA-3gx6-h57h-rm27"},{"ecosystem":"Packagist","fixed":["7.62.0"],"introduced":["7.0.0"],"last_affected":[],"package":"drupal/drupal","purl":null,"source":"GHSA-3gx6-h57h-rm27"},{"ecosystem":"Packagist","fixed":["7.62.0"],"introduced":["7.0.0"],"last_affected":[],"package":"drupal/drupal","purl":"pkg:composer/drupal/drupal","source":"GHSA-3gx6-h57h-rm27"},{"ecosystem":"Packagist","fixed":["8.5.11"],"introduced":["8.0.0"],"last_affected":[],"package":"drupal/drupal","purl":null,"source":"GHSA-3gx6-h57h-rm27"},{"ecosystem":"Packagist","fixed":["8.5.11"],"introduced":["8.0.0"],"last_affected":[],"package":"drupal/drupal","purl":"pkg:composer/drupal/drupal","source":"GHSA-3gx6-h57h-rm27"},{"ecosystem":"Packagist","fixed":["8.6.10"],"introduced":["8.6.0"],"last_affected":[],"package":"drupal/drupal","purl":null,"source":"GHSA-3gx6-h57h-rm27"},{"ecosystem":"Packagist","fixed":["8.6.10"],"introduced":["8.6.0"],"last_affected":[],"package":"drupal/drupal","purl":"pkg:composer/drupal/drupal","source":"GHSA-3gx6-h57h-rm27"}],"prev":{"headline":"PHAR stream wrapper Arbitrary PHP code execution","id":"CVE-2019-6339"},"products":["Drupal Core"],"published":"2019-02-21","related":[{"cvss_score":9.8,"headline":"Drupal Core SQL Injection","id":"CVE-2026-9082","kev_date_added":"2026-05-22","published":"2026-05-20"},{"cvss_score":8.8,"headline":"Drupal core Un-restricted Upload of File","id":"CVE-2020-13671","kev_date_added":"2022-01-18","published":"2020-11-20"},{"cvss_score":10,"headline":"Other in n/a","id":"CVE-2009-3352","kev_date_added":null,"published":"2009-09-24"},{"cvss_score":9.8,"headline":"Drupal core - Less critical - Gadget chain - SA-CORE-2024-006","id":"CVE-2024-55636","kev_date_added":null,"published":"2024-12-09"},{"cvss_score":9.8,"headline":"Drupal core - Moderately critical - Gadget chain - SA-CORE-2024-007","id":"CVE-2024-55637","kev_date_added":null,"published":"2024-12-09"},{"cvss_score":9.8,"headline":"Drupal core - Moderately critical - Gadget chain - SA-CORE-2024-008","id":"CVE-2024-55638","kev_date_added":null,"published":"2024-12-09"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"MIT","name":"Drupal","prefix":"DRUPAL"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"open","licence":"CC0 1.0","name":"CISA KEV"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"BSD-3-Clause","name":"Metasploit"},{"class":"attribution","licence":"GPL-2.0-or-later","name":"Exploit-DB"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"active","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-10-21","vendors":["Drupal"]},"summary":"Remote attackers can execute arbitrary PHP code via unsanitized data in specific field types when web services modules are enabled.","url":"https://insights.sbomify.com/CVE-2019-6340/"}