{"@ID": "1229", "@Name": "Creation of Emergent Resource", "@Abstraction": "Class", "@Structure": "Simple", "@Status": "Incomplete", "Description": "The product manages resources or behaves in a way that indirectly creates a new, distinct resource that can be used by attackers in violation of the intended policy.", "Extended_Description": {"xhtml:p": "A product is only expected to behave in a way that was specifically intended by the developer.  Resource allocation and management is expected to be performed explicitly by the associated code.  However, in systems with complex behavior, the product might indirectly produce new kinds of resources that were never intended in the original design.  For example, a covert channel is a resource that was never explicitly intended by the developer, but it is useful to attackers.  \"Parasitic computing,\" while not necessarily malicious in nature, effectively tricks a product into performing unintended computations on behalf of another party.", "#text_blocks": ["A product is only expected to behave in a way that was specifically intended by the developer.  Resource allocation and management is expected to be performed explicitly by the associated code.  However, in systems with complex behavior, the product might indirectly produce new kinds of resources that were never intended in the original design.  For example, a covert channel is a resource that was never explicitly intended by the developer, but it is useful to attackers.  \"Parasitic computing,\" while not necessarily malicious in nature, effectively tricks a product into performing unintended computations on behalf of another party."]}, "Related_Weaknesses": {"Related_Weakness": {"@Nature": "ChildOf", "@CWE_ID": "664", "@View_ID": "1000", "@Ordinal": "Primary"}}, "Weakness_Ordinalities": {"Weakness_Ordinality": {"Ordinality": "Resultant"}}, "Applicable_Platforms": {"Language": {"@Class": "Not Language-Specific", "@Prevalence": "Undetermined"}, "Operating_System": {"@Class": "Not OS-Specific", "@Prevalence": "Undetermined"}, "Architecture": {"@Class": "Not Architecture-Specific", "@Prevalence": "Undetermined"}}, "Modes_Of_Introduction": {"Introduction": [{"Phase": "Implementation"}, {"Phase": "Architecture and Design"}]}, "Common_Consequences": {"Consequence": {"Scope": "Other", "Impact": "Varies by Context"}}, "Demonstrative_Examples": {"Demonstrative_Example": {"@Demonstrative_Example_ID": "DX-193", "Intro_Text": "In this example, the attacker observes how long an authentication takes when the user types in the correct password.", "Body_Text": ["When the attacker tries their own values, they can first try strings of various length. When they find a string of the right length, the computation will take a bit longer, because the for loop will run at least once. Additionally, with this code, the attacker can possibly learn one character of the password at a time, because when they guess the first character right, the computation will take longer than a wrong guesses. Such an attack can break even the most sophisticated password with a few hundred guesses.", "Note that in this example, the actual password must be handled in constant time as far as the attacker is concerned, even if the actual password is of an unusual length. This is one reason why it is good to use an algorithm that, among other things, stores a seeded cryptographic one-way hash of the password, then compare the hashes, which will always be of the same length."], "Example_Code": {"@Nature": "Bad", "@Language": "Python", "xhtml:div": {"xhtml:div": {"@style": "margin-left:1em;", "xhtml:div": {"xhtml:div": [{"@style": "margin-left:1em;", "#text": "return 0"}, {"@style": "margin-left:1em;", "xhtml:div": {"@style": "margin-left:1em;", "#text": "return 0"}, "#text": "if actual_pw[i] <> typed_pw[i]:"}], "xhtml:br": [null, null], "#text": "if len(actual_pw) <> len(typed_pw):\n\t\t   \n                   for i in len(actual_pw):\n\t\t   \n                   return 1"}}, "#text": "def validate_password(actual_pw, typed_pw):"}, "#text_blocks": ["def validate_password(actual_pw, typed_pw):", "if len(actual_pw) <> len(typed_pw):", "return 0", "for i in len(actual_pw):", "if actual_pw[i] <> typed_pw[i]:", "return 0", "return 1"]}}}, "References": {"Reference": {"@External_Reference_ID": "REF-1049"}}, "Mapping_Notes": {"Usage": "Allowed-with-Review", "Rationale": "This CWE entry is a Class and might have Base-level children that would be more appropriate", "Comments": "Examine children of this entry to see if there is a better fit", "Reasons": {"Reason": {"@Type": "Abstraction"}}}, "Content_History": {"Submission": {"Submission_Name": "CWE Content Team", "Submission_Organization": "MITRE", "Submission_Date": "2020-01-22", "Submission_Version": "4.0", "Submission_ReleaseDate": "2020-02-24"}, "Modification": [{"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-04-27", "Modification_Version": "4.11", "Modification_ReleaseDate": "2023-04-27", "Modification_Comment": "updated Relationships"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2023-06-29", "Modification_Version": "4.12", "Modification_ReleaseDate": "2023-06-29", "Modification_Comment": "updated Mapping_Notes"}, {"Modification_Name": "CWE Content Team", "Modification_Organization": "MITRE", "Modification_Date": "2025-12-11", "Modification_Version": "4.19", "Modification_ReleaseDate": "2025-12-11", "Modification_Comment": "updated Common_Consequences, Demonstrative_Examples, Time_of_Introduction, Weakness_Ordinalities"}]}, "entry_type": "Weakness"}
