Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CWE-669 (在范围间的资源转移不正确) — Vulnerability Class 70

70 vulnerabilities classified as CWE-669 (在范围间的资源转移不正确). AI Chinese analysis included.

CWE-669 represents a critical architectural weakness where a system fails to properly manage the transfer of resources or behaviors between distinct security spheres, such as moving data from an untrusted network zone to a trusted internal environment. Attackers typically exploit this flaw by manipulating the context or metadata during the transition, thereby gaining unintended control over the resource or executing malicious code within a higher-privilege domain. This often occurs when boundary checks are insufficient or when trust assumptions are incorrectly applied across zones. To mitigate this risk, developers must implement rigorous validation and sanitization protocols at every sphere boundary. By strictly enforcing access controls and verifying the integrity of transferred data, engineers can prevent unauthorized privilege escalation and ensure that resources remain confined to their intended operational contexts, effectively neutralizing the potential for cross-sphere exploitation.

MITRE CWE Description
The product does not properly transfer a resource/behavior to another sphere, or improperly imports a resource/behavior from another sphere, in a manner that provides unintended control over that resource.
Common Consequences (1)
Confidentiality, Integrity Read Application Data, Modify Application Data, Unexpected State
Examples (2)
The following code demonstrates the unrestricted upload of a file with a Java servlet and a path traversal vulnerability. The action attribute of an HTML form is sending the upload file request to the Java servlet.
<form action="FileUploadServlet" method="post" enctype="multipart/form-data"> Choose a file to upload: <input type="file" name="filename"/> <br/> <input type="submit" name="submit" value="Submit"/> </form>
Good · HTML
public class FileUploadServlet extends HttpServlet { ... protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); String contentType = request.getContentType(); // the starting position of the boundary header int ind = contentType.indexOf("boundary="); String boundary = contentType.substring(ind+9); String pLine = new String(); String uploadLocation = new String(UPLOAD_DIRECTORY_STRING); //Constant value // verify that content type is multipart form data i
Bad · Java
This code includes an external script to get database credentials, then authenticates a user against the database, allowing access to the application.
//assume the password is already encrypted, avoiding CWE-312 function authenticate($username,$password){ include("http://external.example.com/dbInfo.php"); //dbInfo.php makes $dbhost, $dbuser, $dbpass, $dbname available mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); mysql_select_db($dbname); $query = 'Select * from users where username='.$username.' And password='.$password; $result = mysql_query($query); if(mysql_numrows($result) == 1){ mysql_close(); return true; } else{ mysql_close(); return false; } }
Bad · PHP

Vulnerabilities classified as CWE-669 (在范围间的资源转移不正确) represent 70 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.