{"answers":{"affected":"2 open source packages ship an affected version, including phpmailer/phpmailer. It affects 1 product.","exploited":"There is no known exploitation of CVE-2017-5223 in the wild and no public exploit code.","fix":"Upgrade phpmailer/phpmailer to 5.2.22 or later.","what":"CVE-2017-5223 is a medium-severity vulnerability in n/a, published on 16 Jan 2017. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2017-5223 and fix it if it is affected.\n\nWhat it is: CVE-2017-5223 is a medium-severity vulnerability in n/a, published on 16 Jan 2017. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2017-5223 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- phpmailer/phpmailer (Packagist): affected from 5.0.0; fixed in 5.2.22\n- phpmailer/phpmailer (Packagist): affected from 5.0.0; fixed in 5.2.22\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-2017-5223/ (Markdown: https://insights.sbomify.com/CVE-2017-5223/index.md)","id":"CVE-2017-5223","markdown":"https://insights.sbomify.com/CVE-2017-5223/index.md","name":"CVE-2017-5223","record":{"aliases":["DEBIAN-CVE-2017-5223","DLA-817-1","GHSA-4x5h-cr29-fhp6","UBUNTU-CVE-2017-5223"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"adjacent_or_local","non_default_config":true,"product_category":"PHP email library","requires_auth":"low_privilege","summary":"Attackers can read arbitrary local files by supplying crafted HTML to PHPMailer's msgHTML method without a base directory, exposing sensitive data.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"phpmailer","vendor":"phpmailer_project"}],"cvss":{"score":5.5,"severity":"medium","source":"nvd","vector":"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","version":"3.0"},"cwes":[{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"description":"An issue was discovered in PHPMailer before 5.2.22. PHPMailer's msgHTML method applies transformations to an HTML document to make it usable as an email message body. One of the transformations is to convert relative image URLs into attachments using a script-provided base directory. If no base directory is provided, it resolves to /, meaning that relative image URLs get treated as absolute local file paths and added as attachments. To form a remote vulnerability, the msgHTML method must be called, passed an unfiltered, user-supplied HTML document, and must not set a base directory.","ecosystems":["Packagist"],"exploits":{"exploitdb":1,"first_seen":"2017-10-25","github_poc":1,"max_poc_stars":1,"metasploit":0,"nuclei":0,"refs":[{"date":"2018-09-26T11:58:32Z","kind":"github_poc","ref":"https://github.com/cscli/CVE-2017-5223","stars":1,"title":null},{"date":"2017-10-25","kind":"exploitdb","ref":"43056","stars":null,"title":"PHPMailer \u003c 5.2.21 - Local File Disclosure"}],"tier":"poc_unverified"},"has_fix":true,"headline":"Local file disclosure in PHPMailer","id":"CVE-2017-5223","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"information_disclosure","year":"2017"},"n_packages":2,"n_references":4,"next":{"headline":"Memory corruption in n/a","id":"CVE-2017-5225"},"packages":[{"ecosystem":"Packagist","fixed":["5.2.22"],"introduced":["5.0.0"],"last_affected":[],"package":"phpmailer/phpmailer","purl":null,"source":"GHSA-4x5h-cr29-fhp6"},{"ecosystem":"Packagist","fixed":["5.2.22"],"introduced":["5.0.0"],"last_affected":[],"package":"phpmailer/phpmailer","purl":"pkg:composer/phpmailer/phpmailer","source":"GHSA-4x5h-cr29-fhp6"}],"prev":{"headline":"Path traversal in n/a","id":"CVE-2017-5219"},"products":["n/a"],"published":"2017-01-16","related":[{"cvss_score":9.8,"headline":"Object injection in PHPMailer/PHPMailer","id":"CVE-2020-36326","kev_date_added":null,"published":"2021-04-28"},{"cvss_score":6.1,"headline":"Cross-site scripting in PHPMailer","id":"CVE-2017-11503","kev_date_added":null,"published":"2017-07-20"}],"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":"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":"attribution","licence":"GPL-2.0-or-later","name":"Exploit-DB"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-05","vendors":["n/a"]},"summary":"Attackers can read arbitrary local files by supplying crafted HTML to PHPMailer's msgHTML method without a base directory, exposing sensitive data.","url":"https://insights.sbomify.com/CVE-2017-5223/"}