[high] devskim: BinaryFormatter, SoapFormatter, NetDataContractSerializer, LosFormatter and ObjectStateFormatter reconstruct arbitrary types named in the payload, which allows an attacker who controls the input to run code. ADM.10010 approves only Syst… #864
Reference in new issue
Block a user
high Finding
Scanner: devskim
Severity: high
Rule: DS425070
CWE: CWE-502
CRA: cra-ai-20 — Automatisierte Sicherheitstests (Annex I)
Description
Do not deserialize untrusted data.
Do not deserialize untrusted data.: BinaryFormatter, SoapFormatter, NetDataContractSerializer, LosFormatter and ObjectStateFormatter reconstruct arbitrary types named in the payload, which allows an attacker who controls the input to run code. ADM.10010 approves only System.Text.Json, XmlSerializer, DataContractSerializer, DataContractJsonSerializer, Newtonsoft.Json and protobuf.
Location
File:
compliance-agent/rules/cra_semgrep_csharp.cs(line 96)Code
Remediation
No action required unless this file is compiled and executed as part of the product.
Fingerprint:
cd3ee6b97c96fa1f9651549808ab958cf55987e5bbd2c82e99fb2fa39db839b5Generated by compliance-scanner
Open in Prüfwerk / In Prüfwerk öffnen
Prüfwerk: Die Datei liegt in Testdaten (z. B. fixtures/ oder testdata/), die von der Prüfung ausgenommen sind.
The file lies in test data (such as fixtures/ or testdata/), which is left out of the scan.