Package: audify
Tested Version: 1.8.2
GitHub Repository: https://github.com/almoghamdani/audify
Vulnerability: Invalid Array Index
Providing a negative frameSize
to the new OpusDecoder().decode
or new OpusDecoder().decodeFloat
makes it possible to set a negative value for an array length, leading to the process crash. The frameSize
is not checked for negative values.
Vulnerable code:
- https://github.com/almoghamdani/audify/blob/94b2fe79dc528fda2c7d59c7a0fd0e9de07dc3dc/src/opus_decoder.cpp#L53
- https://github.com/almoghamdani/audify/blob/94b2fe79dc528fda2c7d59c7a0fd0e9de07dc3dc/src/opus_decoder.cpp#L79
Tested on:
Ubuntu 22.04.3 LTS
Node v18.19.0
Installation:
npm install audify
Usage:
node poc.js <poc1|poc2>
- poc1
node poc.js poc1
Running poc1
terminate called after throwing an instance of 'std::bad_array_new_length'
what(): std::bad_array_new_length
Aborted (core dumped)
- poc2
node poc.js poc2
Running poc2
terminate called after throwing an instance of 'std::bad_array_new_length'
what(): std::bad_array_new_length
Aborted (core dumped)
Denial of Service (DoS)
Alessio Della Libera