numpy is vulnerable to Out-of-bounds Read
59
Medium Risk
Casting a fixed-width byte string array (np.bytes_) to NumPy's StringDType copies the raw bytes into the string buffer after only trimming trailing null bytes, without checking that the remaining bytes are valid UTF-8. Later string operations on that StringDType array assume well-formed UTF-8 and index the stored bytes by codepoint, so malformed sequences from an untrusted byte array can drive those operations out of bounds or into a hang. The patch adds bounds-checked UTF-8 validation to the bytes to string cast and hardens related StringDType bounds handling so invalid input is rejected with a TypeError at cast time.
You are affected if you are using a version that falls within the vulnerable range and you cast a np.bytes_ array containing data you do not fully control into StringDType and then perform string operations on it.
numpy is vulnerable to Out-of-bounds Read in versions 2.0.0 - 2.5.2.
Upgrade the numpy library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.