Urgent.News

600+ sources. One page. See who else covered it.

Editions

Tech

TOCTOU in Payment Systems: When Validation Becomes Stale Before Commit

The formal problem: CWE-367 Time-of-check to time-of-use (TOCTOU) is a formally catalogued class of race condition, CWE-367 , first documented in 2006 and still actively relevant two decades later. The pattern: a program evaluates a precondition, then acts on a resource whose state it assumes is unchanged, without any atomicity guarantee between the two operations. The canonical C example: //…

CWE-367, Time-of-check to time-of-use race condition, has been active for two decades since its formal documentation in 2006. This occurs when a program checks a resource's state, then uses it, without ensuring the state remains unchanged in between. A classic example in C involves checking if a file is readable, then attempting to open it.

However, an attacker could overwrite the file during this window, changing its state before the program actually opens it. The same pattern exists in Python and other languages. The solution is to combine the check and use into a single atomic operation. Recent high-severity examples include CVE-2019-5736 and CVE-2016-9806. Distributed systems literature has been studying a related concept, commitment ordering, since 1990.

This principle ensures the chronological order of transactions committing matches the order of their conflicting operations, providing a framework for reasoning about ordering in systems with multiple autonomous resource managers.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Afghan allies still waiting for the safety Germany promised

After the Taliban retook power on August 15, 2021, Berlin promised to bring Afghan staff to Germany. But people are still waiting to leave in Pakistan and Afghanistan.

  • Afghan allies await promised German safety since Taliban's 2021 takeover.
  • Over 37,000 Afghan nationals arrived in Germany by June 2026.
  • Germany's 2025 resettlement program cancellation leaves 600 Afghans stranded.

Russians snap up new homes built on Ukraine 'graveyard'

Russia is constructing high-rises in the occupied Ukrainian city of Mariupol, on the sites of buildings it destroyed. Who's buying these properties?

  • Russians purchase apartments built on Mariupol's ruins.
  • Apartment complex named Leningradsky Kvartal constructed.
  • Discounts up to 12% offered for new buyers.

More from Saturday 15 August →