Ejecuta análisis estático (SAST) sobre el código buscando el patrón inseguro en el flujo de datos.
PHP External Variable Modification
This vulnerability occurs when a PHP application fails to properly validate or sanitize variables that originate from outside the application, such as HTTP query strings, cookies, or POST data.…
What is CWE-473?
Real-world CVEs caused by CWE-473
-
File upload allows arbitrary file read by setting hidden form variables to match internal variable names.
-
Mistakenly trusts $PHP_SELF variable to determine if include script was called by its parent.
-
PHP remote file inclusion by modified assumed-immutable variable.
-
Modify key variable when calling scripts that don't load a library that initializes it.
-
Authentication bypass by modifying array used for authentication.
Ruta del atacante paso a paso
- 1
Identifica una ruta de código que maneje entrada no confiable sin validación.
- 2
Crea un payload que ejercite el comportamiento inseguro — inyección, traversal, overflow o abuso de lógica.
- 3
Envía el payload a través de una solicitud normal y observa la reacción de la aplicación.
- 4
Itera hasta que la respuesta filtre datos, ejecute código del atacante o escale privilegios.
Vulnerable pseudo
MITRE no ha publicado un ejemplo de código para esta CWE. El patrón siguiente es ilustrativo — consulta Recursos para referencias canónicas.
// Example pattern — see MITRE for the canonical references.
function handleRequest(input) {
// Untrusted input flows directly into the sensitive sink.
return executeUnsafe(input);
} Secure pseudo
// Validate, sanitize, or use a safe API before reaching the sink.
function handleRequest(input) {
const safe = validateAndEscape(input);
return executeWithGuards(safe);
} How to prevent CWE-473
- Requirements / Implementation Carefully identify which variables can be controlled or influenced by an external user, and consider adopting a naming convention to emphasize when externally modifiable variables are being used. An application should be reluctant to trust variables that have been initialized outside of its trust boundary. Ensure adequate checking is performed when relying on input from outside a trust boundary. Do not allow your application to run with register_globals enabled. If you implement a register_globals emulator, be extremely careful of variable extraction, dynamic evaluation, and similar issues, since weaknesses in your emulation could allow external variable modification to take place even without register_globals.
How to detect CWE-473
Ejecuta pruebas dinámicas de seguridad de aplicaciones (DAST) contra el endpoint en vivo.
Vigila los logs en tiempo de ejecución para detectar trazas de excepción inusuales, entradas malformadas o intentos de bypass de autorización.
Revisión de código: marca cualquier código nuevo que maneje entrada desde esta superficie sin usar los helpers validados del framework.
Plexicus detecta automáticamente CWE-473 y abre un PR de corrección en menos de 60 segundos.
Codex Remedium escanea cada commit, identifica esta debilidad concreta y entrega un pull request listo para revisión con el parche. Sin tickets. Sin traspasos.
Frequently asked questions
¿Qué es CWE-473?
This vulnerability occurs when a PHP application fails to properly validate or sanitize variables that originate from outside the application, such as HTTP query strings, cookies, or POST data. Attackers can exploit this to inject unexpected values, altering the program's logic and security controls.
¿Qué gravedad tiene CWE-473?
MITRE no ha publicado una calificación de probabilidad de explotación para esta debilidad. Trátala como de impacto medio hasta que tu modelo de amenazas demuestre lo contrario.
¿Qué lenguajes o plataformas se ven afectados por CWE-473?
MITRE lists the following affected platforms: PHP.
¿Cómo puedo prevenir CWE-473?
Carefully identify which variables can be controlled or influenced by an external user, and consider adopting a naming convention to emphasize when externally modifiable variables are being used. An application should be reluctant to trust variables that have been initialized outside of its trust boundary. Ensure adequate checking is performed when relying on input from outside a trust boundary. Do not allow your application to run with register_globals enabled. If you implement a…
¿Cómo detecta y corrige Plexicus CWE-473?
El motor SAST de Plexicus detecta la firma de flujo de datos para CWE-473 en cada commit. Cuando hay coincidencia, nuestro agente Codex Remedium abre un PR de corrección con el código corregido, las pruebas y un resumen de una línea para el revisor.
¿Dónde puedo aprender más sobre CWE-473?
MITRE publica la definición canónica en https://cwe.mitre.org/data/definitions/473.html. También puedes consultar la documentación de OWASP y NIST para guías relacionadas.
Weaknesses related to CWE-473
Modification of Assumed-Immutable Data (MAID)
This vulnerability occurs when an application fails to protect data it assumes cannot be changed, allowing an attacker to alter it.
External Control of Assumed-Immutable Web Parameter
This vulnerability occurs when a web application incorrectly trusts data that appears to be fixed or hidden from the user, such as values…
Public Static Final Field References Mutable Object
This vulnerability occurs when a class exposes a public or protected static final field that points to a changeable object. Because the…
Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion')
This vulnerability occurs when a PHP application uses unvalidated or insufficiently restricted user input directly within file inclusion…
Deja de pagar por desarrollador.
Empieza a cerrar el bucle.
Plexicus es el ASPM nativo de IA que escanea, filtra, corrige, pentestea y explica — de forma autónoma. Desarrolladores ilimitados, repos ilimitados, acciones de IA de uso justo. Nivel gratuito real, €269/mo anual cuando estés listo.