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 3.3.3 [security] - abandoned #201

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

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 20, 2022

Mend Renovate

This PR contains the following updates:

Package Change
socket.io-parser 3.3.2 -> 3.3.3

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.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • 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 Nov 20, 2022
@github-actions
Copy link

Images automagically compressed by Calibre's image-actions

Compression reduced images by 61.5%, saving 9.48 MB.

Filename Before After Improvement Visual comparison
template/public/img/uploads/banner2.webp 213.91 KB 36.67 KB -82.9% View diff
template/public/img/uploads/banners-agosto.jpg 1.15 MB 204.77 KB -82.6% View diff
template/public/img/uploads/banners-agosto.png 1.09 MB 1.06 MB -3.6% View diff
template/public/img/uploads/bolo-cenoura.jpg 236.11 KB 43.90 KB -81.4% View diff
template/public/img/uploads/carrosel_3.png 453.19 KB 421.30 KB -7.0% View diff
template/public/img/uploads/ceifeiro-alimentos-integrais.png 84.16 KB 59.80 KB -29.0% View diff
template/public/img/uploads/chocchipeasterbun-vegan3.jpg 447.01 KB 325.79 KB -27.1% View diff
template/public/img/uploads/cookies-corn-floks-ceifeiro.jpeg 3.51 MB 675.42 KB -81.2% View diff
template/public/img/uploads/dsc2542.jpg 131.22 KB 90.72 KB -30.9% View diff
template/public/img/uploads/grid-de-banners-mobile-1.jpg 760.45 KB 163.24 KB -78.5% View diff
template/public/img/uploads/grid-de-banners-mobile-2.jpg 679.67 KB 151.30 KB -77.7% View diff
template/public/img/uploads/grid-de-banners-mobile-3.jpg 786.38 KB 185.02 KB -76.5% View diff
template/public/img/uploads/jan2022-1.png 1.40 MB 1.34 MB -4.5% View diff
template/public/img/uploads/logo-redes-sociais.jpg 181.38 KB 54.85 KB -69.8% View diff
template/public/img/uploads/mobile-3.jpg 788.61 KB 192.59 KB -75.6% View diff
template/public/img/uploads/pizza-integral.jpg 230.91 KB 47.74 KB -79.3% View diff
template/public/img/uploads/post-27-08.jpg 151.06 KB 137.87 KB -8.7% View diff
template/public/img/uploads/promocoes-1.jpg 378.28 KB 90.42 KB -76.1% View diff
template/public/img/uploads/promocoes-2.jpg 412.94 KB 113.42 KB -72.5% View diff
template/public/img/uploads/rect89.webp 89.89 KB 8.73 KB -90.3% View diff
template/public/img/uploads/sliders-1.jpg 142.62 KB 117.81 KB -17.4% View diff
template/public/img/uploads/sliders-2-.jpg 312.93 KB 106.21 KB -66.1% View diff
template/public/img/uploads/sliders-2.jpg 920.40 KB 178.17 KB -80.6% View diff
template/public/img/uploads/sliders-3.jpg 966.93 KB 198.38 KB -79.5% View diff
template/public/img/uploads/tapioca-dice-typical-northeast-brazilian-food-with-chilli-sugar-syrup-wooden-board_92534-177.jpg 102.61 KB 34.75 KB -66.1% View diff

54 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 3.3.3 [security] chore(deps): update dependency socket.io-parser to 3.3.3 [security] - abandoned Mar 23, 2023
@renovate
Copy link
Contributor Author

renovate bot commented Mar 23, 2023

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.

0 participants