|
635 | 635 | "queries": [ |
636 | 636 | "cwe-queries/cwe-352/cwe-352wLLM.ql", |
637 | 637 | "cwe-queries/cwe-352/MyJsonpInjectionLib.qll", |
638 | | -"cwe-queries/cwe-352/MyJsonStringLib.qll", |
| 638 | + "cwe-queries/cwe-352/MyJsonStringLib.qll", |
639 | 639 | ], |
640 | 640 | "prompts": { |
641 | 641 | "cwe_id": "CWE-352", |
|
672 | 672 | ] |
673 | 673 | } |
674 | 674 | }, |
675 | | - |
| 675 | +"cwe-611wLLM": { |
| 676 | + "name": "cwe-611wLLM", |
| 677 | + "type": "cwe-query", |
| 678 | + "cwe_id": "611", |
| 679 | + "cwe_id_short": "611", |
| 680 | + "cwe_id_tag": "CWE-611", |
| 681 | + "desc": "Improper Restriction of XML External Entity Reference", |
| 682 | + "queries": [ |
| 683 | + "cwe-queries/cwe-611/XXE.ql", |
| 684 | + "cwe-queries/cwe-611/MyXxeRemoteQuery.qll", |
| 685 | + "cwe-queries/cwe-611/MyXxeQuery.qll", |
| 686 | + "cwe-queries/cwe-611/MyXxe.qll" |
| 687 | + ], |
| 688 | + "prompts": { |
| 689 | + "cwe_id": "CWE-611", |
| 690 | + "desc": "Improper Restriction of XML External Entity Reference", |
| 691 | + "long_desc": """\ |
| 692 | + XML documents optionally contain a Document Type Definition (DTD), which, among other features, enables the definition of XML entities. It is possible to define an entity by providing a substitution string in the form of a URI. The XML parser can access the contents of this URI and embed these contents back into the XML document for further processing. \ |
| 693 | +By submitting an XML file that defines an external entity with a file:// URI, an attacker can cause the processing application to read the contents of a local file. For example, a URI such as "file:///c:/winnt/win.ini" designates (in Windows) the file C:\Winnt\win.ini, or file:///etc/passwd designates the password file in Unix-based systems. Using URIs with other schemes such as http://, the attacker can force the application to make outgoing requests to servers that the attacker cannot reach directly, which can be used to bypass firewall restrictions or hide the source of attacks such as port scanning.\ |
| 694 | +Once the content of the URI is read, it is fed back into the application that is processing the XML. This application may echo back the data (e.g. in an error message), thereby exposing the file contents.""", |
| 695 | + "examples": [ |
| 696 | + { |
| 697 | + "package": "javax.xml.transform", |
| 698 | + "class": "DefaultDDFFileValidator", |
| 699 | + "method": "validate", |
| 700 | + "signature": "void validate(Source xmlToValidate)", |
| 701 | + "sink_args": [], |
| 702 | + "type": "source" |
| 703 | + }, |
| 704 | + { |
| 705 | + "package": "java.xml.parsers.DocumentBuilderFactory", |
| 706 | + "class": "DOMWalker", |
| 707 | + "method": "", |
| 708 | + "signature": "Object readObject()", |
| 709 | + "sink_args": [], |
| 710 | + "type": "sink" |
| 711 | + }, |
| 712 | + ] |
| 713 | + } |
| 714 | + }, |
| 715 | + "cwe-295wLLM": { |
| 716 | + "name": "cwe-295wLLM", |
| 717 | + "type": "cwe-query", |
| 718 | + "cwe_id": "295", |
| 719 | + "cwe_id_short": "295", |
| 720 | + "cwe_id_tag": "CWE-295", |
| 721 | + "desc": "Improper Certificate Validation", |
| 722 | + "queries": [ |
| 723 | + "cwe-queries/cwe-295/InsecureTrustManager.ql", |
| 724 | + "cwe-queries/cwe-295/MyInsecureTrustManager.qll", |
| 725 | + "cwe-queries/cwe-295/MyInsecureTrustManagerQuery.qll", |
| 726 | + ], |
| 727 | + "prompts": { |
| 728 | + "cwe_id": "CWE-295", |
| 729 | + "desc": "Improper Certificate Validation", |
| 730 | + "long_desc": """\ |
| 731 | + When a certificate is invalid or malicious, it might allow an attacker to spoof a trusted entity by interfering in the communication path between the host and client. The product might connect to a malicious host while believing it is a trusted host, or the product might be deceived into accepting spoofed data that appears to originate from a trusted host.""", |
| 732 | + "examples": [ |
| 733 | + { |
| 734 | + "package": "org.keycloak.authentication.AuthenticationFlowContext", |
| 735 | + "class": "ValidateX509CertificateUsername", |
| 736 | + "method": "authenticate", |
| 737 | + "signature": "void authenticate(AuthenticationFlowContext context)", |
| 738 | + "sink_args": [], |
| 739 | + "type": "source" |
| 740 | + }, |
| 741 | + { |
| 742 | + "package": "com.tigervnc.rfb", |
| 743 | + "class": "CSecurityTLS", |
| 744 | + "method": "checkServerTrusted", |
| 745 | + "signature": "checkServerTrusted(X509Certificate[] chain, String authType)", |
| 746 | + "sink_args": ["chain", "authType"], |
| 747 | + "type": "sink" |
| 748 | + }, |
| 749 | + ] |
| 750 | + } |
| 751 | + }, |
676 | 752 |
|
677 | 753 | "fetch_external_apis": { |
678 | 754 | "name": "fetch_external_apis", |
|
0 commit comments