취약점 도입 방식
Implementation
적용 가능한 플랫폼
언어
이름: PHP (Undetermined)
클래스: Interpreted (Undetermined)
일반적인 결과
| 범위 |
영향 |
가능성 |
| Integrity | Modify Application Data
참고: An attacker could cause the program to overwrite unintended variables. | |
| Integrity | Modify Application Data
참고: When using PHP, calling extract() or import_request_variables() without the proper arguments could allow arbitrary global variables to be overwritten, including superglobals. | |
관찰된 예시
| 참고 자료 |
설명 |
| extract issue enables file inclusion |
| Chain: PHP app uses extract for register_globals compatibility layer (CWE-621), enabling path traversal (CWE-22) |
| extract() buried in include files makes post-disclosure analysis confusing; original report had seemed incorrect. |
| extract() enables static code injection |
| import_request_variables() buried in include files makes post-disclosure analysis confusing |
잠재적 완화 방법
Phases : Implementation
Use allowlists of variable names that can be extracted.
Phases : Implementation
Consider refactoring your code to avoid extraction routines altogether.
Phases : Implementation
In PHP, call extract() with options such as EXTR_SKIP and EXTR_PREFIX_ALL; call import_request_variables() with a prefix argument. Note that these capabilities are not present in all PHP versions.
취약점 매핑 메모
근거 : This CWE entry is at the Variant level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
댓글 : Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
메모
Probably under-reported for PHP. Seems under-studied for other interpreted languages.
제출
| 이름 |
조직 |
날짜 |
출시일 |
Version |
| CWE Content Team |
MITRE |
2007-05-07 +00:00 |
2007-05-07 +00:00 |
Draft 6 |
수정 사항
| 이름 |
조직 |
날짜 |
댓글 |
| Eric Dalci |
Cigital |
2008-07-01 +00:00 |
updated Time_of_Introduction |
| CWE Content Team |
MITRE |
2008-09-08 +00:00 |
updated Description, Relationships, Observed_Example, Other_Notes, Weakness_Ordinalities |
| CWE Content Team |
MITRE |
2008-10-14 +00:00 |
updated Description |
| CWE Content Team |
MITRE |
2011-06-01 +00:00 |
updated Common_Consequences |
| CWE Content Team |
MITRE |
2012-05-11 +00:00 |
updated Common_Consequences, Demonstrative_Examples, Relationships |
| CWE Content Team |
MITRE |
2012-10-30 +00:00 |
updated Potential_Mitigations |
| CWE Content Team |
MITRE |
2013-02-21 +00:00 |
updated Demonstrative_Examples, Relationships |
| CWE Content Team |
MITRE |
2014-06-23 +00:00 |
updated Description, Other_Notes |
| CWE Content Team |
MITRE |
2014-07-30 +00:00 |
updated Relationships, Taxonomy_Mappings |
| CWE Content Team |
MITRE |
2020-02-24 +00:00 |
updated Relationships |
| CWE Content Team |
MITRE |
2020-06-25 +00:00 |
updated Potential_Mitigations |
| CWE Content Team |
MITRE |
2022-04-28 +00:00 |
updated Research_Gaps |
| CWE Content Team |
MITRE |
2023-04-27 +00:00 |
updated Relationships, Type |
| CWE Content Team |
MITRE |
2023-06-29 +00:00 |
updated Mapping_Notes |
| CWE Content Team |
MITRE |
2023-10-26 +00:00 |
updated Observed_Examples |
| CWE Content Team |
MITRE |
2026-04-30 +00:00 |
updated Potential_Mitigations |
| CWE Content Team |
MITRE |
2026-10-28 +00:00 |
updated Applicable_Platforms, Common_Consequences, Demonstrative_Examples, Description |