Skip to content

⬆️ Update dependency devalue to v5.3.2 [SECURITY] - #579

Merged
gwennlbh merged 1 commit into
mainfrom
renovate/npm-devalue-vulnerability
Aug 27, 2025
Merged

gwennlbh merged 1 commit into
mainfrom
renovate/npm-devalue-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Aug 27, 2025

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
devalue 5.1.1 -> 5.3.2 age confidence

GitHub Vulnerability Alerts

CVE-2025-57820

1. devalue.parse allows __proto__ to be set

A string passed to devalue.parse could represent an object with a __proto__ property, which would assign a prototype to an object while allowing properties to be overwritten:

class Vector {
  constructor(x, y) {
    this.x = x;
    this.y = y;
  }

  get magnitude() {
    return (this.x ** 2 + this.y ** 2) ** 0.5;
  }
}

const payload = `[{"x":1,"y":2,"magnitude":3,"__proto__":4},3,4,"nope",["Vector",5],[6,7],8,9]`;

const vector = devalue.parse(payload, {
  Vector: ([x, y]) => new Vector(x, y)
});

console.log("Is vector", vector instanceof Vector); // true
console.log(vector.x) // 3
console.log(vector.y) // 4
console.log(vector.magnitude); // "nope" instead of 5

2. devalue.parse allows array prototype methods to be assigned to object

In a payload constructed with devalue.stringify, values are represented as array indices, where the array contains the 'hydrated' values:

devalue.stringify({ message: 'hello' }); // [{"message":1},"hello"]

devalue.parse does not check that an index is numeric, which means that it could assign an array prototype method to a property instead:

const object = devalue.parse('[{"toString":"push"}]');
object.toString(); // 0

This could be used by a creative attacker to bypass server-side validation.


Release Notes

sveltejs/devalue (devalue)

v5.3.2

Compare Source

Patch Changes
  • 0623a47: fix: disallow array method access when parsing
  • 0623a47: fix: disallow __proto__ properties on objects

v5.3.1

Compare Source

Patch Changes
  • ae904c5: fix: correctly differentiate between +0 and -0

v5.3.0

Compare Source

Minor Changes
  • 2896e7b: feat: support Temporal
  • fec694d: feat: support URL and URLSearchParams objects

v5.2.0

Compare Source

  • Handle custom classes with null proto as pojo (#​95)

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: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 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 was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot temporarily deployed to #579: App preview August 27, 2025 01:30 Inactive
@gwennlbh
gwennlbh merged commit a7fbf9b into main Aug 27, 2025
@renovate
renovate Bot deleted the renovate/npm-devalue-vulnerability branch August 27, 2025 23:10

This branch was successfully deployed

4 active deployments
#579: App preview — 5657d7ed Deployed Aug 27, 2025 by gwennlbh
#579: End-to-end tests report — 5657d7ed Deployed Aug 27, 2025 by renovate[bot]
#579: Test coverage report — 5657d7ed Deployed Aug 27, 2025 by renovate[bot]
#579: Unit tests report — 5657d7ed Deployed Aug 27, 2025 by renovate[bot]
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.

1 participant