{"answers":{"affected":"2 open source packages ship an affected version, including matrix-appservice-irc. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-3971 in the wild and no public exploit code.","fix":"Upgrade matrix-appservice-irc to 0.36.0 or later.","what":"CVE-2022-3971 is a medium-severity SQL injection vulnerability in unspecified matrix-appservice-irc, published on 13 Nov 2022. 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-2022-3971 and fix it if it is affected.\n\nWhat it is: CVE-2022-3971 is a medium-severity SQL injection vulnerability in unspecified matrix-appservice-irc, published on 13 Nov 2022. 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-2022-3971 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- matrix-appservice-irc (npm): affected all versions; fixed in 0.36.0\n- matrix-appservice-irc (npm): affected all versions; fixed in 0.36.0\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-3971/ (Markdown: https://insights.sbomify.com/CVE-2022-3971/index.md)","id":"CVE-2022-3971","markdown":"https://insights.sbomify.com/CVE-2022-3971/index.md","name":"CVE-2022-3971","record":{"aliases":["GHSA-ffwf-47x2-jpr8"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Matrix IRC bridge","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary SQL commands via the roomIds argument in the Matrix IRC bridge, potentially reading or modifying database contents.","user_interaction":"not_required","vuln_class":"sql_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"VulDB","cpe":[{"product":"matrix_irc_bridge","vendor":"matrix"}],"cvss":{"score":4.6,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:L","version":"3.1"},"cwes":[{"id":"CWE-707","name":"Improper Neutralization"}],"description":"A vulnerability was found in matrix-appservice-irc up to 0.35.1. It has been declared as critical. This vulnerability affects unknown code of the file src/datastore/postgres/PgDataStore.ts. The manipulation of the argument roomIds leads to sql injection. Upgrading to version 0.36.0 is able to address this issue. The name of the patch is 179313a37f06b298150edba3e2b0e5a73c1415e7. It is recommended to upgrade the affected component. VDB-213550 is the identifier assigned to this vulnerability.","ecosystems":["npm"],"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":"matrix-appservice-irc PgDataStore.ts sql injection","id":"CVE-2022-3971","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"sql_injection","year":"2022"},"n_packages":2,"n_references":4,"next":{"headline":"Pingkon HMS-PHP adminlogin.php sql injection","id":"CVE-2022-3972"},"packages":[{"ecosystem":"npm","fixed":["0.36.0"],"introduced":["0"],"last_affected":[],"package":"matrix-appservice-irc","purl":null,"source":"GHSA-ffwf-47x2-jpr8"},{"ecosystem":"npm","fixed":["0.36.0"],"introduced":["0"],"last_affected":[],"package":"matrix-appservice-irc","purl":"pkg:npm/matrix-appservice-irc","source":"GHSA-ffwf-47x2-jpr8"}],"prev":{"headline":"LibTIFF tif_getimage.c TIFFReadRGBATileExt integer overflow","id":"CVE-2022-3970"},"products":["matrix-appservice-irc"],"published":"2022-11-13","related":[{"cvss_score":8.8,"headline":"Parsing issue in matrix-org/node-irc leading to room takeovers","id":"CVE-2022-39203","kev_date_added":null,"published":"2022-09-13"},{"cvss_score":8,"headline":"Improper handling of multiline messages in matrix-appservice-irc","id":"CVE-2022-29166","kev_date_added":null,"published":"2022-05-05"},{"cvss_score":5.8,"headline":"matrix-appservice-irc IRC command injection via admin commands containing newlines","id":"CVE-2023-38690","kev_date_added":null,"published":"2023-08-04"},{"cvss_score":4.3,"headline":"IRC mode parameter confusion in matrix-appservice-irc","id":"CVE-2022-39202","kev_date_added":null,"published":"2022-09-13"},{"cvss_score":3.5,"headline":"matrix-appservice-irc events can be crafted to leak parts of targeted messages from other bridged rooms","id":"CVE-2023-38700","kev_date_added":null,"published":"2023-08-04"},{"cvss_score":2.7,"headline":"Matrix IRC Bridge allows IRC command injection to own puppeted user","id":"CVE-2025-27146","kev_date_added":null,"published":"2025-02-25"}],"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)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-15","vendors":["unspecified"]},"summary":"Attackers can execute arbitrary SQL commands via the roomIds argument in the Matrix IRC bridge, potentially reading or modifying database contents.","url":"https://insights.sbomify.com/CVE-2022-3971/"}