CVE-2021-40516
WeeChat before 3.2.1 allows remote attackers to cause a denial of service (crash) via a crafted...
WeeChat before 3.2.1 allows remote attackers to cause a denial of service (crash) via a crafted WebSocket frame that trigger an out-of-bounds read in plugins/relay/relay-websocket.c in the Relay plugin.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
7.5
WeeChat before 3.2.1 allows remote attackers to cause a denial of service (crash) via a crafted WebSocket frame that trigger an out-of-bounds read in plugins/relay/relay-websocket.c in the Relay plugin.
- Record
CVE-2021-40516- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:N/I:N/A:P - Weakness
- CWE-125
- Updated
- 2026-11-02
CVE List No score
WeeChat before 3.2.1 allows remote attackers to cause a denial of service (crash) via a crafted WebSocket frame that trigger an out-of-bounds read in plugins/relay/relay-websocket.c in the Relay plugin.
- Record
CVE-2021-40516- Updated
- 2026-11-02
EUVDEUVD-2021-27692 No score
WeeChat before 3.2.1 allows remote attackers to cause a denial of service (crash) via a crafted WebSocket frame that trigger an out-of-bounds read in plugins/relay/relay-websocket.c in the Relay plugin.
- Record
EUVD-2021-27692- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-82mm-45xg-j4xh No score
WeeChat before 3.2.1 allows remote attackers to cause a denial of service (crash) via a crafted...
WeeChat before 3.2.1 allows remote attackers to cause a denial of service (crash) via a crafted WebSocket frame that trigger an out-of-bounds read in plugins/relay/relay-websocket.c in the Relay plugin.
- Record
GHSA-82mm-45xg-j4xh- Weakness
- CWE-125
- Updated
- 2026-11-02
OSVALPINE-CVE-2021-40516
7.5
WeeChat before 3.2.1 allows remote attackers to cause a denial of service (crash) via a crafted WebSocket frame that trigger an out-of-bounds read in plugins/relay/relay-websocket.c in the Relay plugin.
- Record
ALPINE-CVE-2021-40516- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-03
OSV
7.5
WeeChat before 3.2.1 allows remote attackers to cause a denial of service (crash) via a crafted WebSocket frame that trigger an out-of-bounds read in plugins/relay/relay-websocket.c in the Relay plugin.
- Record
CVE-2021-40516- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 5 moreShow less
OSVDEBIAN-CVE-2021-40516
7.5
WeeChat before 3.2.1 allows remote attackers to cause a denial of service (crash) via a crafted WebSocket frame that trigger an out-of-bounds read in plugins/relay/relay-websocket.c in the Relay plugin.
- Record
DEBIAN-CVE-2021-40516- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-40516
7.5
WeeChat before 3.2.1 allows remote attackers to cause a denial of service (crash) via a crafted WebSocket frame that trigger an out-of-bounds read in plugins/relay/relay-websocket.c in the Relay plugin.
- Record
UBUNTU-CVE-2021-40516- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVMGASA-2021-0466 No score
Updated weechat packages fix security vulnerability
A crafted WebSocket frame could result in a crash in the weechat Relay plugin.
- Record
MGASA-2021-0466- Updated
- 2026-11-02
OSVopenSUSE-SU-2022:0083-1 No score
Security update for weechat
This update for weechat fixes the following issues:
update to 3.2.1:
- CVE-2021-40516: relay: fix crash when decoding a malformed websocket frame (boo#1190206)
update to 3.2
main changes:
- use XDG directories by default (config, data, cache, runtime)
- add support of IRC SASL mechanisms SCRAM-SHA-1, SCRAM-SHA-256 and SCRAM-SHA-512
- automatically load system certificates without giving a hardcoded path to the file with certificates
- add options to customize commands executed on system signals received (SIGHUP, SIGQUIT, SIGTERM, SIGUSR1, SIGUSR2)
- add bar item 'tls_version' and buflist format
- add signals 'cursor_start' and 'cursor_end'
- add function crypto_hmac in API
- add translated string in evaluation of expressions with 'translate:xxx'
- add info 'weechat_daemon'
- add Python stub for WeeChat API
- add variables '${tg_shell_argc}' and '${tg_shell_argvN}' in command trigger evaluated strings
- many bugs fixed.
for all changes, please visit: https://weechat.org/files/changelog/ChangeLog-3.2.html
update to 3.1
New features
- core: add options weechat.look.hotlist_update_on_buffer_switch and weechat.look.read_marker_update_on_buffer_switch (issue #992, issue #993)
- core: add option sec.crypt.passphrase_command to read passphrase from an external program on startup, remove option sec.crypt.passphrase_file (issue #141)
- core: improve debug in command /eval: display more verbose debug with two '-d', add indentation and colors
- core: add options 'setvar' and 'delvar' in command /buffer, rename option 'localvar' to 'listvar'
- core: add buffer local variable 'completion_default_template' (evaluated) to override the value of option 'weechat.completion.default_template' (issue #1600)
- core: add option 'recreate' in command /filter
- core: add raw string in evaluation of expressions with 'raw:xxx' (issue #1611)
- core: add evaluation of conditions in evaluation of expressions with 'eval_cond:xxx' (issue #1582)
- api: add info_hashtable 'secured_data'
- irc: add info 'irc_is_message_ignored'
- irc: add server option 'default_chantypes', used when the server does not send them in message 005 (issue #1610)
- trigger: add variable '${tg_trigger_name}' in command trigger evaluated strings (issue #1580)
-
Bug fixes
- core: fix quoted line in cursor mode (issue #1602)
- core: fix wrong size of the new window after vertical split (issue #1612)
- core: do not remove quotes in arguments of command /eval as they can be part of the evaluated expression/condition (issue #1601)
- core: display an error when the buffer is not found with command /command -buffer
- buflist: add option buflist.look.use_items to speed up display of buflist (issue #1613)
- irc: add bar item 'irc_nick_prefix'
- irc: fix separator between nick and host in bar item 'irc_nick_host'
- irc: fix completion of commands /halfop and /dehalfop
-
Documentation
- do not build weechat-headless man page if headless binary is disabled (issue #1607)
update to 3.0.1:
- exec: fix search of command by identifier
- spell: fix refresh of bar item 'spell_suggest' when the input becomes empty (issue #1586)
- spell: fix crash with IRC color codes in command line (issue #1589)
update to 3.0
New features
- api: add optional list of colors in infos 'nick_color' and 'nick_color_name' (issue #1565)
- api: add argument 'bytes' in function string_dyn_concat
- api: add function string_color_code_size (issue #1547)
- exec: add option '-oerr' to send stderr to buffer (now disabled by default) (issue #1566)
- fset: add option fset.look.auto_refresh (issue #1553)
- irc: add pointer to irc_nick in focus of bar item 'buffer_nicklist' (issue #1535, issue #1538)
- irc: allow to send text on buffers with commands /allchan, /allpv and /allserv
- irc: evaluate command executed by commands /allchan, /allpv and /allserv (issue #1536)
- script: add…
- Record
openSUSE-SU-2022:0083-1- Updated
- 2026-11-02
OSVUSN-5258-1 No score
weechat vulnerabilities
Stuart Nevans Locke discovered that WeeChat's relay plugin insecurely handled malformed websocket frames. A remote attacker in control of a server could possibly use this issue to cause denial of service in a client. (CVE-2021-40516)
Stuart Nevans Locke discovered that WeeChat insecurely handled certain IRC messages. A remote attacker in control of a server could possibly use this issue to cause denial of service in a client. This issue only affected Ubuntu 16.04 ESM and Ubuntu 18.04 ESM. (CVE-2020-9760)
Stuart Nevans Locke discovered that WeeChat insecurely handled certain IRC messages. A remote unauthenticated attacker could possibly use these issues to cause denial of service in a client. These issues only affected Ubuntu 16.04 ESM and Ubuntu 18.04 ESM. (CVE-2020-9759, CVE-2020-8955)
Joseph Bisch discovered that WeeChat's logger incorrectly handled certain memory operations when handling log file names. A remote attacker could possibly use this issue to cause denial of service in a client. This issue only affected Ubuntu 16.04 ESM. (CVE-2017-14727)
- Record
USN-5258-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
weechatAlpine:v3.15 |
0.4.1 up to 3.5-r0 | 3.5-r0 |
weechatDebian:12 |
before 3.2.1-1 | 3.2.1-1 |
weechatDebian:13 |
before 3.2.1-1 | 3.2.1-1 |
weechatDebian:14 |
before 3.2.1-1 | 3.2.1-1 |
weechatDebian:9 From an advisory covering 4 CVEs |
before 1.6-1+deb9u3, plus listed versions 1.6-1+deb9u11.6-1+deb9u2 |
1.6-1+deb9u3 |
weechatMageia:8 |
before 3.0-1.1.mga8 | 3.0-1.1.mga8 |
weechatUbuntu:Pro:16.04:LTS |
before 1.4-2ubuntu0.1+esm1, plus listed versions 1.3-11.3-1build11.4-11.4-1build11.4-1build21.4-21.4-2ubuntu0.1 |
1.4-2ubuntu0.1+esm1 |
weechatUbuntu:Pro:18.04:LTS |
before 1.9.1-1ubuntu1+esm1, plus listed versions 1.9.1-11.9.1-1build11.9.1-1ubuntu1 |
1.9.1-1ubuntu1+esm1 |
weechatUbuntu:Pro:20.04:LTS |
before 2.8-1ubuntu0.1~esm1, plus listed versions 2.6-22.6-2build12.6-2build22.6-2ubuntu12.6-2ubuntu22.8-1 |
2.8-1ubuntu0.1~esm1 |
weechatUbuntu:Pro:16.04:LTS From an advisory covering 5 CVEs |
before 1.4-2ubuntu0.1+esm1, plus listed versions 1.3-11.3-1build11.4-11.4-1build11.4-1build21.4-21.4-2ubuntu0.1 |
1.4-2ubuntu0.1+esm1 |
Show 4 moreShow less
| Package | Affected | Fixed |
|---|---|---|
weechatUbuntu:Pro:18.04:LTS From an advisory covering 5 CVEs |
before 1.9.1-1ubuntu1+esm1, plus listed versions 1.9.1-11.9.1-1build11.9.1-1ubuntu1 |
1.9.1-1ubuntu1+esm1 |
weechatUbuntu:Pro:20.04:LTS From an advisory covering 5 CVEs |
before 2.8-1ubuntu0.1~esm1, plus listed versions 2.6-22.6-2build12.6-2build22.6-2ubuntu12.6-2ubuntu22.8-1 |
2.8-1ubuntu0.1~esm1 |
weechatSUSE:Package Hub 15 SP3 |
before 3.2.1-bp153.2.3.1 | 3.2.1-bp153.2.3.1 |
weechatopenSUSE:Leap 15.3 |
before 3.2.1-bp153.2.3.1 | 3.2.1-bp153.2.3.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| affected, aliases, references | OSV | |
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-40516 is a high vulnerability (CVSS 7.5) in Weechat, published September 5, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.59%, the 75th percentile. Fixed in weechat 3.5-r0.
References
weechat.org/doc/security
github.com/weechat/weechat/commit/8b1331f98de1714bae15a9ca2e2b393ba49d735b
lists.debian.org/debian-lts-announce/2021/09/msg00018.html
nvd.nist.gov/vuln/detail/CVE-2021-40516
github.com/advisories/GHSA-82mm-45xg-j4xh
security.alpinelinux.org/vuln/CVE-2021-40516
Show 14 moreShow less
security-tracker.debian.org/tracker/CVE-2021-40516
advisories.mageia.org/MGASA-2021-0466.html
bugs.mageia.org/show_bug.cgi?id=29513
debian.org/lts/security/2021/dla-2770
ubuntu.com/security/CVE-2021-40516
ubuntu.com/security/notices/USN-5258-1
cve.org/CVERecord?id=CVE-2021-40516
ubuntu.com/security/CVE-2017-14727
ubuntu.com/security/CVE-2020-8955
ubuntu.com/security/CVE-2020-9759
ubuntu.com/security/CVE-2020-9760
lists.opensuse.org/archives/list/[email protected]/thread/BIN6EHDK3X2MKPRRVYID7266KDLB6SHB
bugzilla.suse.com/1190206
suse.com/security/cve/CVE-2021-40516
Left out here: the rest of 1 source description. The JSON record has them.