# CVE-2022-3971: matrix-appservice-irc PgDataStore.ts sql injection

- Priority: **Routine**
- Reason: Not severe (CVSS 4.6, adjacent network); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2022-11-13 · Modified: 2025-04-15
- Aliases: GHSA-ffwf-47x2-jpr8
- Record: https://cvemate.com/vulnerability/CVE-2022-3971 · JSON: https://cvemate.com/vulnerability/CVE-2022-3971/json

## Description

```text
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.
```

## Signals

- CVSS: 5.6 medium (v3.1, NVD) CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
- EPSS: 0.704%, percentile 54.691%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- matrix matrix\_irc\_bridge: ≤ 0.36.0
- Npm matrix-appservice-irc (Npm): \< 0.36.0
- unspecified matrix-appservice-irc: 0.35.0 \| 0.35.1

## References

- <https://github.com/matrix-org/matrix-appservice-irc/pull/1619>
- <https://github.com/matrix-org/matrix-appservice-irc/releases/tag/0.36.0>
- <https://github.com/matrix-org/matrix-appservice-irc/commit/179313a37f06b298150edba3e2b0e5a73c1415e7>
- <https://vuldb.com/?id.213550>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-3971>
- <https://github.com/matrix-org/matrix-appservice-irc>

---

Data as of 2026-12-05T05:31:19.504Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
