제출 #881030: SourceCodester Dynamic Input Field Generator Using HTML, CSS, and PHP N/A Cross-Site Request Forgery정보

제목SourceCodester Dynamic Input Field Generator Using HTML, CSS, and PHP N/A Cross-Site Request Forgery
설명A vulnerability was found in Sourcecodester Dynamic Input Field Generator Using HTML, CSS, and PHP. This vulnerability affects the file public/submit.php. Processing of the argument person leads to cross site request forgery. The attack can be launched remotely. No authentication is required for exploitation. The application accepts POST requests to public/submit.php and performs a database insert, via the saveUser function in includes/queries.php, for every request received, without generating, embedding, or validating any anti-CSRF token. As a result, a third-party website can host a form that automatically submits to this endpoint, causing a victim's browser to insert attacker-controlled data into the application's database without the victim's knowledge or consent. Proof of Concept: The following HTML page, if visited by a user with network access to the target application, silently submits a forged request. Hosted on an attacker-controlled page: form id equals f, action equals http colon slash slash TARGET slash public slash submit.php, method equals POST, containing a hidden input named person open bracket close bracket with value forged-by-csrf, followed by a script that calls document.getElementById of f dot submit. Upon page load, the victim's browser sends a POST request to public/submit.php, and the value forged-by-csrf is inserted into the person table with no further interaction and no validation that the request originated from the application's own form. Impact: An unauthenticated remote attacker can force any visitor's browser to insert arbitrary data into the application's database. Because the application currently has no authentication layer, the direct impact is data integrity loss and mass forged submissions, application-level data pollution. In any deployment that later adds authentication or ties submissions to a user session, this same flaw would allow forged actions to be performed as the victim. Mitigation: Generate a per-session CSRF token, embed it as a hidden field in the form in public/index.php, and validate it in public/submit.php with a constant-time comparison, such as hash_equals, before processing the person array from the POST request. Reject the request outright if the token is missing, malformed, or does not match.
원천⚠️ https://gist.github.com/rionyxraiza/428d4481fe471704829ca06de7be9d8c
사용자
 Aswin K S (UID 99569)
제출2026. 07. 06. AM 09:18 (2 개월 ago)
모더레이션2026. 08. 20. PM 09:38 (2 months later)
상태수락
VulDB 항목393853 [SourceCodester Dynamic Input Field Generator Using HTML, CSS, and PHP 교차 사이트 요청 위조]
포인트들20

Interested in the pricing of exploits?

See the underground prices here!