Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency socket.io-parser to 4.2.1 [security] - abandoned #219

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 28, 2022

Mend Renovate

This PR contains the following updates:

Package Change
socket.io-parser 4.0.4 -> 4.0.5
socket.io-parser 4.2.0 -> 4.2.1

GitHub Vulnerability Alerts

CVE-2022-2421

Due to improper type validation in the socket.io-parser library (which is used by the socket.io and socket.io-client packages to encode and decode Socket.IO packets), it is possible to overwrite the _placeholder object which allows an attacker to place references to functions at arbitrary places in the resulting query object.

Example:

const decoder = new Decoder();

decoder.on("decoded", (packet) => {
 console.log(packet.data); // prints [ 'hello', [Function: splice] ]
})

decoder.add('51-["hello",{"_placeholder":true,"num":"splice"}]');
decoder.add(Buffer.from("world"));

This bubbles up in the socket.io package:

io.on("connection", (socket) => {
 socket.on("hello", (val) => {
 // here, "val" could be a function instead of a buffer
 });
});

⚠️ IMPORTANT NOTE ⚠️

You need to make sure that the payload that you received from the client is actually a Buffer object:

io.on("connection", (socket) => {
 socket.on("hello", (val) => {
 if (!Buffer.isBuffer(val)) {
 socket.disconnect();
 return;
 }
 // ...
 });
});

If that's already the case, then you are not impacted by this issue, and there is no way an attacker could make your server crash (or escalate privileges, ...).

Example of values that could be sent by a malicious user:

  • a number that is out of bounds

Sample packet: 451-["hello",{"_placeholder":true,"num":10}]

io.on("connection", (socket) => {
 socket.on("hello", (val) => {
 // val is `undefined`
 });
});
  • a value that is not a number, like undefined

Sample packet: 451-["hello",{"_placeholder":true,"num":undefined}]

io.on("connection", (socket) => {
 socket.on("hello", (val) => {
 // val is `undefined`
 });
});
  • a string that is part of the prototype of Array, like "push"

Sample packet: 451-["hello",{"_placeholder":true,"num":"push"}]

io.on("connection", (socket) => {
 socket.on("hello", (val) => {
 // val is a reference to the "push" function
 });
});
  • a string that is part of the prototype of Object, like "hasOwnProperty"

Sample packet: 451-["hello",{"_placeholder":true,"num":"hasOwnProperty"}]

io.on("connection", (socket) => {
 socket.on("hello", (val) => {
 // val is a reference to the "hasOwnProperty" function
 });
});

This should be fixed by:

Dependency analysis for the socket.io package

socket.io version socket.io-parser version Covered?
4.5.2...latest ~4.2.0 (ref) Yes ✔️
4.1.3...4.5.1 ~4.0.4 (ref) Yes ✔️
3.0.5...4.1.2 ~4.0.3 (ref) Yes ✔️
3.0.0...3.0.4 ~4.0.1 (ref) Yes ✔️
2.3.0...2.5.0 ~3.4.0 (ref) Yes ✔️

Dependency analysis for the socket.io-client package

socket.io-client version socket.io-parser version Covered?
4.5.0...latest ~4.2.0 (ref) Yes ✔️
4.3.0...4.4.1 ~4.1.1 (ref) No, but the impact is very limited
3.1.0...4.2.0 ~4.0.4 (ref) Yes ✔️
3.0.5 ~4.0.3 (ref) Yes ✔️
3.0.0...3.0.4 ~4.0.1 (ref) Yes ✔️
2.2.0...2.5.0 ~3.3.0 (ref) Yes ✔️

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Oct 28, 2022
@github-actions
Copy link
Contributor

Images automagically compressed by Calibre's image-actions

Compression reduced images by 3.3%, saving 57.17 KB.

Filename Before After Improvement Visual comparison
template/public/img/uploads/banner_domi_mobile.webp 35.27 KB 34.83 KB -1.2% View diff
template/public/img/uploads/banner_hard1.webp 116.16 KB 113.99 KB -1.9% View diff
template/public/img/uploads/banner_hard2.webp 128.78 KB 127.34 KB -1.1% View diff
template/public/img/uploads/banner-quadrado.jpg 141.74 KB 132.46 KB -6.5% View diff
template/public/img/uploads/banner-quadrado.webp 82.03 KB 76.23 KB -7.1% View diff
template/public/img/uploads/banner-site.jpg 115.67 KB 108.22 KB -6.4% View diff
template/public/img/uploads/banner-site.webp 67.36 KB 60.91 KB -9.6% View diff
template/public/img/uploads/frete_gratis_full.webp 84.83 KB 83.56 KB -1.5% View diff
template/public/img/uploads/frete_gratis_mobile.webp 83.96 KB 82.66 KB -1.5% View diff
template/public/img/uploads/linha_dark-1.webp 54.54 KB 53.47 KB -2.0% View diff
template/public/img/uploads/linha_dark-2.webp 58.50 KB 57.41 KB -1.9% View diff
template/public/img/uploads/lov_banner_site-diadosnamorados.webp 80.50 KB 79.47 KB -1.3% View diff
template/public/img/uploads/lov_bannerssite-fireice-quadrado.webp 172.29 KB 164.79 KB -4.4% View diff
template/public/img/uploads/lov_bannerssite-fireice-retangular-site.webp 135.49 KB 133.33 KB -1.6% View diff
template/public/img/uploads/lov_post1-novosite1.webp 72.00 KB 70.84 KB -1.6% View diff
template/public/img/uploads/lov-banner-presentes-joias-site-.webp 68.42 KB 67.63 KB -1.2% View diff
template/public/img/uploads/lov-posts-presentes-joias-site.webp 63.15 KB 62.27 KB -1.4% View diff
template/public/img/uploads/selo_google.webp 1.61 KB 1.57 KB -2.4% View diff
template/public/img/uploads/vibre_1.webp 67.15 KB 65.25 KB -2.8% View diff
template/public/img/uploads/vibre_2.webp 78.40 KB 74.46 KB -5.0% View diff

55 images did not require optimisation.

@renovate
Copy link
Contributor Author

renovate bot commented Nov 28, 2022

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

@renovate renovate bot changed the title chore(deps): update dependency socket.io-parser to 4.2.1 [security] chore(deps): update dependency socket.io-parser to 4.2.1 [security] - abandoned Dec 23, 2022
@renovate
Copy link
Contributor Author

renovate bot commented Dec 23, 2022

Autoclosing Skipped

This PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants