The OpenZeppelin Contracts library's Base64 encoding function may read memory beyond the intended input buffer when the input length is not a multiple of three. This can cause up to 4 bits of potentially uninitialized or 'dirty' memory to be included in the encoded output, leading to output corruption. The issue affects versions 4.5.0 up to but not including 4.9.6, and 5.0.0-rc.0 up to but not including 5.0.2. Fixed versions 4.9.6 and 5.0.2 address this problem.