Vulnérabilité dans github.com/apple/swift-corelibs-foundation (CVE-2022-1642)
Résumé
Vulnérabilité dans github.com/apple/swift-corelibs-foundation (CVE-2022-1642). Risque d'opérations non autorisées ou de divulgation. Atténuation : mise à jour vers 5.6.2 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Impact
A program using swift-corelibs-foundation is vulnerable to a denial of service attack caused by a potentially malicious source producing a JSON document containing a type mismatch.
This vulnerability is caused by the interaction between a deserialization mechanism offered by the Swift standard library, the Codable protocol; and the JSONDecoder class offered by swift-corelibs-foundation, which can deserialize types that adopt the Codable protocol based on the content of a provided JSON document. When a type that adopts Codable requests the initialization of a field with an integer value, the JSONDecoder class uses a type-erased container with different accessor methods to attempt and coerce a corresponding JSON value and produce an integer. In the case the JSON value was a numeric literal with a floating-point portion, JSONDecoder used different type-eraser methods during validation than it did during the final casting of the value. The checked casting produces a deterministic crash due to this mismatch.
The JSONDecoder class is often wrapped by popular Swift-based web frameworks to parse the body of HTTP requests and perform basic type validation. This makes the attack low-effort: sending a specifically crafted JSON document during a request to these endpoints will cause them to crash.
The attack does not have any confidentiality or integrity risks in and of itself; the crash is produced deterministically by an abort function that ensures that execution does no…
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2022-1642 a été découverte dans github.com/apple/swift-corelibs-foundation.
Risque d'opérations non autorisées ou de divulgation.
Action : mettez à jour github.com/apple/swift-corelibs-foundation vers 5.6.2 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « github.com/apple/swift-corelibs-foundation CVE-2022-1642 » sur le site de l'éditeur.
CVE-2022-1642 (github.com/apple/swift-corelibs-foundation) — CWE-704
Vecteur d'attaque : distant (réseau) / non authentifié / sans interaction utilisateur
Correctif : 5.6.2 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une vulnérabilité (CWE-704) affecte github.com/apple/swift-corelibs-foundation.
Consultez l'avis de l'éditeur pour les versions affectées de github.com/apple/swift-corelibs-foundation.
Gravité : ?. Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 5.6.2.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'github.com/apple/swift-corelibs-foundation' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
github.com/apple/swift-corelibs-foundationを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade github.com/apple/swift-corelibs-foundation to 5.6.2ステージング環境で 5.6.2 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com