At present for Drupal core security issues, releases do not typically include tests.
Tests (usually worked on alongside the fixes) are usually held back and published in public followups around 2 months after the core SA.
The reason for this is that tests often spell out the details of a vulnerability, and in many cases are effectively a Proof of Concept exploit.
Holding them back gives sites some time to patch.
However it's now pretty trivial to get an LLM to help reverse engineer a fix and come up with a Proof of Concept exploit; it's arguably a bit of an outdated policy to wait as long as 2 months to release the tests.
We could either shorten the embargo on tests (e.g. to 2 weeks?) or eliminate it completely and release tests alongside the fix.
Personally I (mcdruid) would vote for a shortened 2 week embargo.
This policy is followed by Drupal core, but not enforced for contrib - maintainers are welcome (/ encouraged) to follow the core policy for contrib security releases too.
Comments
Comment #2
xjmPersonally I think the 2-month embargo is still fine. Every line of test code we release also gives LLMs more information to reverse-engineer a vulnerability.
We regularly make exceptions to the policy and release the tests on the day of if they don't actually disclose more about the vulnerability than the fix and/or SA themselves. I think a case-by-case basis is still appropriate, where we hold the 2-month embargo by default, but choose to release the tests earlier if there is low risk, an exploit is already in the wild, etc.
What are the advantages of shortening the window? (Excluding a one-off with a contrib maintainer asking about releasing a test earlier, since that has happened once in like a decade-plus of this policy.)
Comment #3
mcdruid commentedGood question.
There'd be an advantage in not holding tests back at all in that all the release work gets done once; no follow-ups required.
Similarly, after two months (often longer in practice) the specifics may have faded from memory a bit and looking at a follow-up to add (and re-review) the tests can require trawling the context back up from mental cold storage (for me at least).
I think it's a fair point to say that a case-by-case approach makes sense; sometimes that tests don't give much away that's not obvious from the fix.. in those cases I think we should take the path of least resistance and publish the tests as part of the release (@xjm mentions that sometimes happens already).
There are times when the tests give away something non-obvious about how an exploit might work, and for those any additional cost in holding tests back for as long as 2 months perhaps continues to make sense.
I think the argument for shortening the window is along the lines of Linus Torvalds saying that nowadays vulnerabilities are "pretty much by definition not secret” but the context there was slightly different.
Comment #4
cmlaraSpeaking as a contrib maintainer however I believe most of this should be relevant to core too:
In the past couple weeks I had mulled this over and decided to change my policy to release tests at the same time I release the security fix into the dev branch (I had been waiting two weeks to a month in the past).
This came after evaluating many of the same reasons as @mcdruid raised.
(No particular order, numbered just in case they need to be referenced in latter messages.)
Almost all of that applies to core IMO, and I've seen several these points missed as devs continue to work on issues putting in changes that are now firmly incompatible with the previous security fix, only realizing this when months later the tests are merged (or when I speak up to warn them).
I also want to put a nod to the IoC side, I frequently reverse engineer the Core/Contrib fix and guess on what I should be looking for in my logs, praying for core to release tests months latter, and if the test don't match my determinations I need to re-run log analysis on the logs to see if I was compromised before applying the patch. Having tests sooner (same day) I would argue makes my site more secure and helps me detect and remove any zero day exploit usage.
The point about attackers having a time advantage is why I've not been planing on including it as part of the tagged security release itself (since it goes public a few hours before the DST announces it) and instead will only include it as part of the dev branch commit after publication.
I will admit a test can give slightly more information than just the fix, however I firmly agree that is a becoming an ever decreasing gap in protection. IIRC on Drupal Slack we were hearing about exploit attempts the day after SA-CORE-2026-004, in all likelihood the exploit attempts started much sooner. Did withholding those tests really make the vulnerability any less effective for attackers? I've so bar been using AI to analyze possible security releases, I've not yet tasked it to try and generate PoC's however that would be a likely future step.
Another item to consider is, how long do vulnerability reporters withhold their PoC's? I'm currently on a 30 day post public release policy (though I'm very much aware my entire 90+30 policy may be shrinking due to the changes in the past year). I'm only a single data point so the question is important to ask, how long are third parties, especially those using LLM's willing to wait to release their side? Equally worth asking is would any of them consider the public release of test as a permission to disclose their PoC's sooner and what impact that has.
IMHO: Tests withholding more just makes us feel more secure rather than making us truly more secure.
Comment #5
catchI think for core we should default to releasing the tests with the security release and only hold them back if we're specifically uncomfortable with them going out. But then if we really are uncomfortable two months seems OK.
For me the main issue is the overhead of removing the tests and opening an issue months later and then a separate review/RTBC/commit step for core all over again. And not being able to fully close the security issue for the two months until those additional steps are completed. Lack of tests also makes any public followup work on the issue harder to do. And people working on those public issues may not even know there are private tests that are embargoed.
Comment #6
mcdruid commented+1
That might not be much of a change from the current defacto procedure, but good to have it written down ... if nothing else.
Comment #7
longwave+1 for catch's proposal in #5, less work for committers and security team members; I am sure we have some security issues where we forgot to add the tests or are languishing in the core queue.
Comment #8
catchI think my suggestion in #5 is pretty close to the current policy but without checking I think we've been tending towards embargoing tests recently in practice so it would be loosening how it's applied.
Comment #9
mcdruid commentedThanks for the discussion.
I think we can close this "works as designed"; the conclusion was summed up by @catch's last comment and #5:
Now we've got this written down somewhere, we can try to follow the policy (and re-review if and when needed).
Comment #11
mcdruid commentedActually I'll mark it as Fixed so that I can assign contribution credit.
Comment #12
cmlarahttps://www.drupal.org/drupal-security-team/contacted-by-the-security-te... Still says
If you have created automated tests that test the vulnerability do not commit them at the time of the release, but instead hold onto them for a while (e.g. 2 weeks) before committingBack to needs work for the docs to be updated to match the core policy.
Unless something has changed that I missed even non-fixed issues should receive credit. That changed about a year ago IIRC.
Comment #13
mcdruid commentedI wasn't sure about the contribution record - it didn't seem to allow me to assign credit (I checked that I was logged in :). I'll try again with the first choice of status.
I've updated the docs you linked to; hopefully they're clear for contrib maintainers on this subject now.
Thanks.