{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2019-9787 in the wild and no public exploit code.","fix":"Upgrade to a fixed version.","what":"CVE-2019-9787 is a high-severity cross-site scripting vulnerability in Wordpress Wordpress, published on 14 Mar 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2019-9787 and fix it if it is affected.\n\nWhat it is: CVE-2019-9787 is a high-severity cross-site scripting vulnerability in Wordpress Wordpress, published on 14 Mar 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2019-9787 in the wild and no public exploit code.\n\nAffected product: Wordpress Wordpress. No package-level version data is available, so check the vendor advisory linked from the reference page.\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-9787/ (Markdown: https://insights.sbomify.com/CVE-2019-9787/index.md)","id":"CVE-2019-9787","markdown":"https://insights.sbomify.com/CVE-2019-9787/index.md","name":"CVE-2019-9787","record":{"aliases":["DEBIAN-CVE-2019-9787","GHSA-vqp9-3cmr-vgcc","UBUNTU-CVE-2019-9787"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution","privilege_escalation"],"network_reachable":"yes","non_default_config":false,"product_category":"WordPress core","requires_auth":"none","summary":"Unauthenticated attackers can exploit XSS to gain admin access and execute arbitrary code via PHP file modification in WordPress.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"wordpress","vendor":"wordpress"}],"cvss":{"score":8.8,"severity":"high","source":"nvd","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-352","name":"Cross-Site Request Forgery"}],"description":"WordPress before 5.1.1 does not properly filter comment content, leading to Remote Code Execution by unauthenticated users in a default configuration. This occurs because CSRF protection is mishandled, and because Search Engine Optimization of A elements is performed incorrectly, leading to XSS. The XSS results in administrative access, which allows arbitrary changes to .php files. This is related to wp-admin/includes/ajax-actions.php and wp-includes/comment.php.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":"2019-04-15","github_poc":6,"max_poc_stars":3,"metasploit":0,"nuclei":0,"refs":[{"date":"2020-05-01T13:44:10Z","kind":"github_poc","ref":"https://github.com/sijiahi/Wordpress_cve-2019-9787_defense","stars":3,"title":"This is a recurrence of cve-2019-9787 on Wordpress and a hash-based defense."},{"date":"2019-04-15T03:59:44Z","kind":"github_poc","ref":"https://github.com/rkatogit/cve-2019-9787_csrf_poc","stars":2,"title":null},{"date":"2019-08-18T04:50:37Z","kind":"github_poc","ref":"https://github.com/PalmTreeForest/CodePath_Week_7-8","stars":0,"title":"CodePath Assignment for Weeks 7 \u0026 8: CVE-2017-14719, CVE-2019-9787 \u0026 Unauthenticated Page/Post Content Modification via REST API"},{"date":"2020-05-19T22:09:43Z","kind":"github_poc","ref":"https://github.com/matinciel/Wordpress_CVE-2019-9787","stars":0,"title":"Try to reproduce this issue with Docker"},{"date":"2021-06-29T08:57:43Z","kind":"github_poc","ref":"https://github.com/dexXxed/CVE-2019-9787","stars":0,"title":"Overview PoC of CSRF CVE-2019-9787 WordPress Version 5.1.1 "},{"date":"2022-04-30T12:19:50Z","kind":"github_poc","ref":"https://github.com/kuangting4231/mitigation-cve-2019-9787","stars":0,"title":null}],"tier":"poc_unverified"},"has_fix":true,"headline":"Cross-site scripting in n/a","id":"CVE-2019-9787","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":"wordpress:wordpress","products":["wordpress:wordpress"],"type":"xss","year":"2019"},"n_packages":0,"n_references":8,"next":{"headline":"Memory corruption in Firefox","id":"CVE-2019-9788"},"packages":[],"prev":{"headline":"Code injection in n/a","id":"CVE-2019-9785"},"products":["n/a"],"published":"2019-03-14","related":[{"cvss_score":9.8,"headline":"WordPress Core Interpretation Conflict","id":"CVE-2026-63030","kev_date_added":"2026-07-21","published":"2026-07-17"},{"cvss_score":8.1,"headline":"WordPress Core Remote File Inclusion","id":"CVE-2026-87902","kev_date_added":"2026-09-25","published":"2026-09-22"},{"cvss_score":5.9,"headline":"WordPress Core SQL Injection","id":"CVE-2026-60137","kev_date_added":"2026-07-21","published":"2026-07-17"},{"cvss_score":10,"headline":"Cross-site scripting in n/a","id":"CVE-2012-2399","kev_date_added":null,"published":"2012-04-21"},{"cvss_score":10,"headline":"Other in n/a","id":"CVE-2012-2400","kev_date_added":null,"published":"2012-04-21"},{"cvss_score":10,"headline":"Other in n/a","id":"CVE-2011-3122","kev_date_added":null,"published":"2011-08-10"},{"cvss_score":10,"headline":"Other in n/a","id":"CVE-2011-3125","kev_date_added":null,"published":"2011-08-10"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"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)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["n/a"]},"summary":"Unauthenticated attackers can exploit XSS to gain admin access and execute arbitrary code via PHP file modification in WordPress.","url":"https://insights.sbomify.com/CVE-2019-9787/"}