-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Description
Ref:
Lines 99 to 102 in af828ae
| using (MemoryStream ms = new MemoryStream((byte[])SerializedValue)) | |
| { | |
| value = (new BinaryFormatter()).Deserialize(ms); | |
| } |
Lines 196 to 199 in af828ae
| using (MemoryStream ms = new MemoryStream(buffer)) | |
| { | |
| return (new BinaryFormatter()).Deserialize(ms); | |
| } |
Lines 222 to 227 in af828ae
| using (MemoryStream ms = new MemoryStream()) | |
| { | |
| BinaryFormatter bf = new BinaryFormatter(); | |
| bf.Serialize(ms, _value); | |
| return ms.ToArray(); | |
| } |
This issue tracks the removal and replacement of this code per the BinaryFormatter obsoletion plan.
For context: Reading from local configuration is generally perceived to be a "safe" operation. However, we have seen cases where the config APIs are used in multi-tenant environments, reading values from arbitrary XML files. The same thing hit ResourceReader a few years back. A popular web service allowed non-admins to upload .resx files, and when the web service tried parsing it it allowed RCE within the context of the service.