Skip to content

Commit f9fa192

Browse files
committed
Merge branch 'master' of github.com:HackTricks-wiki/hacktricks
2 parents 1847cc9 + 6090e4c commit f9fa192

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/pentesting-web/deserialization/ruby-class-pollution.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ json_input = ARGV[0]
252252
JSONMergerApp.run(json_input)
253253
```
254254

255+
> **Hashie deep_merge mutation regression (2025):** In Hashie 5.0.0, `Hashie::Extensions::DeepMerge#deep_merge` mutated nested sub-hashes on the receiver instead of duplicating them. Merging attacker-controlled data into long‑lived objects could therefore persist changes across requests, polluting previously “safe” instances. Behavior was corrected in 5.0.1.
256+
255257
## Poison the Classes <a href="#escaping-the-object-to-poison-the-class" id="escaping-the-object-to-poison-the-class"></a>
256258

257259
In the following example it's possible to find the class **`Person`**, and the the clases **`Admin`** and **`Regular`** which inherits from the **`Person`** class. It also has another class called **`KeySigner`**:
@@ -415,8 +417,6 @@ It's possible to brute-force the defined classes and at some point poison the cl
415417
## References
416418

417419
- [https://blog.doyensec.com/2024/10/02/class-pollution-ruby.html](https://blog.doyensec.com/2024/10/02/class-pollution-ruby.html)
420+
- [https://ruby.libhunt.com/hashie-latest-version](https://ruby.libhunt.com/hashie-latest-version)
418421

419422
{{#include ../../banners/hacktricks-training.md}}
420-
421-
422-

0 commit comments

Comments
 (0)