Skip to content

Conversation

@ronperris
Copy link

Remediation

The source code in base64.js says that both encode¹ and decode² expect a string parameter. I see two obvious solutions.

  1. Return null when base64.encode or base64.decode are given something other than a string.
  2. Convert the parameter passed into base64.encode and base64.decode into a string before encoding or decoding.

To preserve backward compatibility with existing usage that might not be expecting null as a return value from encoding or decoding values that are not strings, I think we should covert the parameter to a string then perform that encode or decode operation.

¹ https://github.com/flatiron/utile/blob/master/lib/base64.js#L12
² https://github.com/flatiron/utile/blob/master/lib/base64.js#L30

@rjd40
Copy link

rjd40 commented May 7, 2019

Any update on getting this PR merged? I'm unable to use this package because of this vulnerability.

@raphi
Copy link

raphi commented Dec 27, 2019

@indexzero could you review this PR 🙏 As @rjd40 said, we are blocked by this security issue as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants