DEV Community

nabbisen
nabbisen

Posted on • Edited on • Originally published at scqr.net

2

sudoedit (`sudo -e`) に係る脆弱性 (CVE-2023-22809)

脆弱性情報

sudo の、sudoedit (sudo -e) に係る脆弱性です。任意のファイルを変更され、権限奪取、およびそれをもとにした情報窃取が行われるおそれがあります。

CVE

CVE-2023-22809

影響範囲

公式サイトには 次のように書かれています:

If no users have been granted access to sudoedit there is no impact.

(私訳: sudoedit へのアクセスが許可されているユーザーが存在しない場合、影響はありません。)

一例を挙げます。/etc/sudoers (あるいは visudo の編集先) に次のような行が存在する場合:

someuser ALL=(root) sudoedit /etc/some.conf
Enter fullscreen mode Exit fullscreen mode

someuser は本件の不具合を悪用することで他のファイルを編集できます。

対応方法

1.8 以降のバージョンの場合、2023-01-19 本日リリースの最新版 (1.9.12p2) に更新することが推奨されています。

暫定対応

すぐのアップデートが難しい場合、

sudoers に 1 行追加することでリスクを軽減できる、と公式サイト (英語) で 案内 されています:

Defaults!sudoedit    env_delete+="SUDO_EDITOR VISUAL EDITOR"
Enter fullscreen mode Exit fullscreen mode

参考

本記事は小社のツイートをもとにしています。

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay