{"answers":{"affected":"3 open source packages ship an affected version, including libphp, php and php-min. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-31631 exists.","fix":"Upgrade libphp to a fixed version for your release line: 8.0.27, 8.1.15 or 8.2.2.","what":"CVE-2022-31631 is a critical SQL injection vulnerability in Php Php, published on 12 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-31631 and fix it if it is affected.\n\nWhat it is: CVE-2022-31631 is a critical SQL injection vulnerability in Php Php, published on 12 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2022-31631 exists.\n\nAffected packages and fixed versions:\n- libphp (Bitnami): affected from 8.0.0; fixed in 8.0.27, 8.1.15, 8.2.2\n- php (Bitnami): affected from 8.0.0; fixed in 8.0.27, 8.1.15, 8.2.2\n- php-min (Bitnami): affected from 8.0.0; fixed in 8.0.27, 8.1.15, 8.2.2\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-2022-31631/ (Markdown: https://insights.sbomify.com/CVE-2022-31631/index.md)","id":"CVE-2022-31631","markdown":"https://insights.sbomify.com/CVE-2022-31631/index.md","name":"CVE-2022-31631","record":{"aliases":["BIT-libphp-2022-31631","BIT-php-2022-31631","BIT-php-min-2022-31631","DEBIAN-CVE-2022-31631","ECHO-ed42-71c8-1af5","GHSA-4qmr-c42j-3wg2","MGASA-2023-0013","SUSE-SU-2023:0073-1","SUSE-SU-2023:0074-1","SUSE-SU-2023:0084-1","UBUNTU-CVE-2022-31631","USN-5818-1","openSUSE-SU-2024:12601-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"PHP language","requires_auth":"none","summary":"Attackers can exploit improper quoting in PDO::quote() for SQLite to perform SQL injection, potentially reading or modifying database contents.","user_interaction":"not_required","vuln_class":"sql_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"php","cpe":[{"product":"php","vendor":"php"}],"cvss":{"score":9.1,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"description":"In PHP versions 8.0.* before 8.0.27, 8.1.* before 8.1.15, 8.2.* before 8.2.2 when using PDO::quote() function to quote user-supplied data for SQLite, supplying an overly long string may cause the driver to incorrectly quote the data, which may further lead to SQL injection vulnerabilities.","ecosystems":["Bitnami","SUSE:Enterprise Storage 6","SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS","SUSE:Linux Enterprise Module for Legacy 15 SP4","SUSE:Linux Enterprise Module for Package Hub 15 SP4","SUSE:Linux Enterprise Module for Web and Scripting 15 SP4","SUSE:Linux Enterprise Server 15 SP1-LTSS","SUSE:Linux Enterprise Server for SAP Applications 15 SP1","openSUSE:Leap 15.4","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"PDO::quote() may return unquoted string","id":"CVE-2022-31631","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"php:php","products":["php:php"],"type":"sql_injection","year":"2022"},"n_packages":32,"n_references":1,"next":{"headline":"Race condition in HP PC BIOS","id":"CVE-2022-31635"},"packages":[{"ecosystem":"Bitnami","fixed":["8.0.27","8.1.15","8.2.2"],"introduced":["8.0.0","8.1.0","8.2.0"],"last_affected":[],"package":"libphp","purl":"pkg:bitnami/libphp","source":"BIT-libphp-2022-31631"},{"ecosystem":"Bitnami","fixed":["8.0.27","8.1.15","8.2.2"],"introduced":["8.0.0","8.1.0","8.2.0"],"last_affected":[],"package":"php","purl":"pkg:bitnami/php","source":"BIT-php-2022-31631"},{"ecosystem":"Bitnami","fixed":["8.0.27","8.1.15","8.2.2"],"introduced":["8.0.0","8.1.0","8.2.0"],"last_affected":[],"package":"php-min","purl":"pkg:bitnami/php-min","source":"BIT-php-min-2022-31631"},{"ecosystem":"SUSE:Enterprise Storage 6","fixed":["7.2.34-150000.4.106.1"],"introduced":["0"],"last_affected":[],"package":"php7","purl":"pkg:rpm/suse/php7\u0026distro=SUSE%20Enterprise%20Storage%206","source":"SUSE-SU-2023:0084-1"},{"ecosystem":"SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS","fixed":["7.2.34-150000.4.106.1"],"introduced":["0"],"last_affected":[],"package":"php7","purl":"pkg:rpm/suse/php7\u0026distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP1-LTSS","source":"SUSE-SU-2023:0084-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Legacy 15 SP4","fixed":["7.4.33-150400.4.16.1"],"introduced":["0"],"last_affected":[],"package":"apache2-mod_php7","purl":"pkg:rpm/suse/apache2-mod_php7\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Legacy%2015%20SP4","source":"SUSE-SU-2023:0073-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Legacy 15 SP4","fixed":["7.4.33-150400.4.16.1"],"introduced":["0"],"last_affected":[],"package":"php7","purl":"pkg:rpm/suse/php7\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Legacy%2015%20SP4","source":"SUSE-SU-2023:0073-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Legacy 15 SP4","fixed":["7.4.33-150400.4.16.1"],"introduced":["0"],"last_affected":[],"package":"php7-fastcgi","purl":"pkg:rpm/suse/php7-fastcgi\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Legacy%2015%20SP4","source":"SUSE-SU-2023:0073-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Legacy 15 SP4","fixed":["7.4.33-150400.4.16.1"],"introduced":["0"],"last_affected":[],"package":"php7-fpm","purl":"pkg:rpm/suse/php7-fpm\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Legacy%2015%20SP4","source":"SUSE-SU-2023:0073-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Package Hub 15 SP4","fixed":["7.4.33-150400.4.16.1"],"introduced":["0"],"last_affected":[],"package":"php7-embed","purl":"pkg:rpm/suse/php7-embed\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Package%20Hub%2015%20SP4","source":"SUSE-SU-2023:0073-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Web and Scripting 15 SP4","fixed":["8.0.27-150400.4.23.1"],"introduced":["0"],"last_affected":[],"package":"apache2-mod_php8","purl":"pkg:rpm/suse/apache2-mod_php8\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Web%20and%20Scripting%2015%20SP4","source":"SUSE-SU-2023:0074-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Web and Scripting 15 SP4","fixed":["8.0.27-150400.4.23.1"],"introduced":["0"],"last_affected":[],"package":"php8","purl":"pkg:rpm/suse/php8\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Web%20and%20Scripting%2015%20SP4","source":"SUSE-SU-2023:0074-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Web and Scripting 15 SP4","fixed":["8.0.27-150400.4.23.1"],"introduced":["0"],"last_affected":[],"package":"php8-embed","purl":"pkg:rpm/suse/php8-embed\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Web%20and%20Scripting%2015%20SP4","source":"SUSE-SU-2023:0074-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Web and Scripting 15 SP4","fixed":["8.0.27-150400.4.23.1"],"introduced":["0"],"last_affected":[],"package":"php8-fastcgi","purl":"pkg:rpm/suse/php8-fastcgi\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Web%20and%20Scripting%2015%20SP4","source":"SUSE-SU-2023:0074-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Web and Scripting 15 SP4","fixed":["8.0.27-150400.4.23.1"],"introduced":["0"],"last_affected":[],"package":"php8-fpm","purl":"pkg:rpm/suse/php8-fpm\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Web%20and%20Scripting%2015%20SP4","source":"SUSE-SU-2023:0074-1"},{"ecosystem":"SUSE:Linux Enterprise Module for Web and Scripting 15 SP4","fixed":["8.0.27-150400.4.23.1"],"introduced":["0"],"last_affected":[],"package":"php8-test","purl":"pkg:rpm/suse/php8-test\u0026distro=SUSE%20Linux%20Enterprise%20Module%20for%20Web%20and%20Scripting%2015%20SP4","source":"SUSE-SU-2023:0074-1"},{"ecosystem":"SUSE:Linux Enterprise Server 15 SP1-LTSS","fixed":["7.2.34-150000.4.106.1"],"introduced":["0"],"last_affected":[],"package":"php7","purl":"pkg:rpm/suse/php7\u0026distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP1-LTSS","source":"SUSE-SU-2023:0084-1"},{"ecosystem":"SUSE:Linux Enterprise Server for SAP Applications 15 SP1","fixed":["7.2.34-150000.4.106.1"],"introduced":["0"],"last_affected":[],"package":"php7","purl":"pkg:rpm/suse/php7\u0026distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP1","source":"SUSE-SU-2023:0084-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["7.4.33-150400.4.16.1"],"introduced":["0"],"last_affected":[],"package":"apache2-mod_php7","purl":"pkg:rpm/opensuse/apache2-mod_php7\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:0073-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["8.0.27-150400.4.23.1"],"introduced":["0"],"last_affected":[],"package":"apache2-mod_php8","purl":"pkg:rpm/opensuse/apache2-mod_php8\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:0074-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["7.2.34-150000.4.106.1"],"introduced":["0"],"last_affected":[],"package":"php7","purl":"pkg:rpm/opensuse/php7\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:0084-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["7.4.33-150400.4.16.1"],"introduced":["0"],"last_affected":[],"package":"php7","purl":"pkg:rpm/opensuse/php7\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:0073-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["7.4.33-150400.4.16.1"],"introduced":["0"],"last_affected":[],"package":"php7-embed","purl":"pkg:rpm/opensuse/php7-embed\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:0073-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["7.4.33-150400.4.16.1"],"introduced":["0"],"last_affected":[],"package":"php7-fastcgi","purl":"pkg:rpm/opensuse/php7-fastcgi\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:0073-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["7.4.33-150400.4.16.1"],"introduced":["0"],"last_affected":[],"package":"php7-fpm","purl":"pkg:rpm/opensuse/php7-fpm\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:0073-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["7.4.33-150400.4.16.1"],"introduced":["0"],"last_affected":[],"package":"php7-test","purl":"pkg:rpm/opensuse/php7-test\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:0073-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["8.0.27-150400.4.23.1"],"introduced":["0"],"last_affected":[],"package":"php8","purl":"pkg:rpm/opensuse/php8\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:0074-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["8.0.27-150400.4.23.1"],"introduced":["0"],"last_affected":[],"package":"php8-embed","purl":"pkg:rpm/opensuse/php8-embed\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:0074-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["8.0.27-150400.4.23.1"],"introduced":["0"],"last_affected":[],"package":"php8-fastcgi","purl":"pkg:rpm/opensuse/php8-fastcgi\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:0074-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["8.0.27-150400.4.23.1"],"introduced":["0"],"last_affected":[],"package":"php8-fpm","purl":"pkg:rpm/opensuse/php8-fpm\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:0074-1"},{"ecosystem":"openSUSE:Leap 15.4","fixed":["8.0.27-150400.4.23.1"],"introduced":["0"],"last_affected":[],"package":"php8-test","purl":"pkg:rpm/opensuse/php8-test\u0026distro=openSUSE%20Leap%2015.4","source":"SUSE-SU-2023:0074-1"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["8.1.14-1.1"],"introduced":["0"],"last_affected":[],"package":"php8","purl":"pkg:rpm/opensuse/php8\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2024:12601-1"}],"prev":{"headline":"OOB read due to insufficient input validation in imageloadfont()","id":"CVE-2022-31630"},"products":["PHP"],"published":"2025-02-12","related":[{"cvss_score":10,"headline":"Integer overflow in n/a","id":"CVE-2012-2688","kev_date_added":null,"published":"2012-07-20"},{"cvss_score":10,"headline":"Memory corruption in n/a","id":"CVE-2012-2376","kev_date_added":null,"published":"2012-05-21"},{"cvss_score":10,"headline":"Memory corruption in n/a","id":"CVE-2011-3268","kev_date_added":null,"published":"2011-08-25"},{"cvss_score":10,"headline":"Other in n/a","id":"CVE-2009-4143","kev_date_added":null,"published":"2009-12-21"},{"cvss_score":10,"headline":"Memory corruption in n/a","id":"CVE-2008-5557","kev_date_added":null,"published":"2008-12-23"},{"cvss_score":10,"headline":"Memory corruption in n/a","id":"CVE-2008-2050","kev_date_added":null,"published":"2008-05-05"},{"cvss_score":10,"headline":"Command injection in n/a","id":"CVE-2008-2051","kev_date_added":null,"published":"2008-05-05"}],"sources":[{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"SUSE"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"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":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-02-13","vendors":["PHP Group"]},"summary":"Attackers can exploit improper quoting in PDO::quote() for SQLite to perform SQL injection, potentially reading or modifying database contents.","url":"https://insights.sbomify.com/CVE-2022-31631/"}