Question 340 A customer portal uses client-side validation to prevent negative payment amounts but the API accepts negative values directly. What should change? Lower the request timeout Add more JavaScript validation only Enforce input and business rules on the server Rename the field in the HTML form Explanation Correct Answer C:Client checks can be bypassed by direct API calls. Incorrect Answers A:Timeouts are unrelated to amount validation. B:An attacker can skip the browser. D:Naming does not secure the API.
Question 341 A web service accepts arbitrary domain names for image retrieval and stores fetched content without malware checks. What risks should developers address? Only increase thumbnail dimensions Disable all error handling Trust HTTPS domains implicitly SSRF, file-type validation and safe processing of retrieved content Explanation Correct Answer D:Both outbound fetch authority and untrusted file handling require protection. Incorrect Answers A:Display size does not restrict network access. B:That impairs detection and recovery. C:TLS cannot establish authorization or content safety.
Question 342 A server returns permissive wildcard CORS for a credentialed private API. Which control should be prioritized? Explicit allowlisted origins and correct credentialed CORS handling Assume login cookies alone fix the issue Move the API to another port only Disable all CSP headers Explanation Correct Answer A:Cross-origin private data should not be exposed to arbitrary websites. Incorrect Answers B:Browser credentials can accompany cross-site requests under some conditions. C:Port movement does not enforce browser origin restrictions. D:That weakens browser defenses.
Question 343 A CI pipeline fetches build dependencies from a mutable untrusted repository without pinning versions. What supply-chain control helps? Disable build logs to conceal warnings Pin and verify dependencies with integrity and provenance checks Always use latest without testing Store access tokens in the repository Explanation Correct Answer B:Controlled artifact identity reduces substitution risk. Incorrect Answers A:Warnings aid auditability. C:Unreviewed changes may introduce vulnerabilities. D:That increases credential theft risk.
Question 344 A database API includes user-supplied table names directly in dynamic SQL where parameters cannot represent identifiers. What safe design fits? Concatenate arbitrary identifiers because values are parameterized Disable query logging instead Allowlist approved identifiers and parameterize all value expressions Trust identifiers from authenticated users automatically Explanation Correct Answer C:Identifier selection needs explicit validation while data values remain bound. Incorrect Answers A:Binding values does not secure object names. B:Logs do not sanitize SQL. D:Authentication is not unrestricted query authority.
Question 345 A reverse proxy passes a user-controlled X-Forwarded-For header as proof of internal origin. What defect is present? Proof that the source is internal An unfixable encryption weakness A mandatory DNSSEC failure Trusting an unverified client-controlled provenance header Explanation Correct Answer D:Only trusted proxies should set authoritative forwarding metadata. Incorrect Answers A:Untrusted clients can supply arbitrary header values. B:The issue is source-trust validation. C:Forwarded headers are HTTP metadata.
Question 346 An admin portal uses a hardcoded emergency username and password on every installation. What should be fixed? Remove universal credentials and require unique managed secrets per deployment Hide the credentials in the help document only Change the page logo Increase the browser's font size Explanation Correct Answer A:Shared default accounts create scalable compromise risk. Incorrect Answers B:Documentation secrecy cannot protect hardcoded secrets. C:Appearance does not affect authentication. D:Visual settings do not eliminate backdoors.
Question 347 A cloud workload role allows its application to edit its own audit trail, even though its business task needs only object reads. What mitigation is most direct? Grant the role global administrative access Disable all audit collection to reduce storage Only increase audit log file size Remove log-modification privileges from the workload role Explanation Correct Answer D:Least privilege protects evidence against workload compromise. Incorrect Answers A:That expands damage potential. B:That worsens integrity protection. C:Capacity does not control who may modify logs.
Question 348 A web app permits an untrusted filename to choose where an uploaded archive is extracted. What must extraction code enforce? Trust archive path separators because upload is authenticated Disable antivirus signatures during extraction Extract every file as root for convenience Normalize paths and reject archive entries escaping the intended extraction root Explanation Correct Answer D:Zip-slip-style path traversal can overwrite unintended files. Incorrect Answers A:Authenticated users can still supply unsafe entries. B:This removes a defense. C:This magnifies harm.
Question 349 A payment application needs a critical patch, but its vendor mandates preproduction validation. What is the best remediation sequence? Test the patch, approve a window, deploy with rollback and validate the fix Deploy immediately without backup or testing Treat a passing test as proof the patch was applied to production Leave the vulnerability untracked until the vendor retires the system Explanation Correct Answer A:Controlled change reduces outage and security risk together. Incorrect Answers B:Unverified changes can interrupt payment processing. C:Deployment and post-change evidence are separate. D:The exposure remains active.
Question 350 A patch rollout succeeds on 90% of servers, but ten hosts still report the old vulnerable package. What should be done? Close all findings because most hosts are fixed Reboot every unrelated device blindly Investigate deployment failures and verify remediation on the remaining hosts Disable scanner access to the failed systems Explanation Correct Answer C:A partial rollout does not complete the vulnerability response. Incorrect Answers A:Residual vulnerable hosts remain. B:Reboots must address the actual failure. D:That conceals gaps.