tech::hexagram

personal note for technical issue.

依存先のnode moduleの脆弱性がGithubから通知された

今朝方、github.comからメールでこんな通知が来た。

image

よく見ると、「あんたのrepositoryの依存moduleに脆弱性があったから、このバージョンに上げると良いよ」という旨の内容。

image

実際にリポジトリを見に行くとこのような注意を促すポップアップが出ていた。

image

hoek というnode moduleに対し、 CVE-2018-3728脆弱性が発生していたらしい。

hoek node module before 5.0.3 suffers from a Modification of Assumed-Immutable Data (MAID) vulnerability via 'merge' and 'applyToDefaults' functions, which allows a malicious user to modify the prototype of "Object" via proto, causing the addition or modification of an existing property that will exist on all objects.

mergeapplyToDefaults の関数で、悪意のあるユーザーが任意のObjectを __proto__ 経由で操作できるようになってしまうというものだった。

github.com

ライブラリのcommitを辿ると今年の2/7には解消していたらしい。脆弱性情報データベース(NVD)を元に通知しているため、厳密には修正からNVDへの反映までの時間と、github.comのNVDのクロールまでの時間でタイムラグが発生してしまう。しかしながら、このように気づかなかった脆弱性にもきめ細かく対応できるので個人的にはありがたい機能だなと思った。

image

解消するとこのようにリポジトリから警告が消えたので一安心。