Open Source License restrictions and recent sanctions against Russia
<p>Does there exist an open source license like GPL, GPLv2, BSD and so on which allows author to prohibit usage of the licensed software in some country?</p>

<p>For the GPL &quot;family&quot; of open source licenses, the answer is no.</p>
<p>The <a href="https://www.gnu.org/licenses/gpl-faq.html#NoMilitary" rel="noreferrer">GPL FAQ</a> answers a closely related question:</p>
<blockquote>
<p><strong>I'd like to license my code under the GPL, but I'd also like to make it clear that it can't be used for military and/or commercial uses. Can I do this?</strong> (#NoMilitary)</p>
<p>No, because those two goals contradict each other. The GNU GPL is designed specifically to prevent the addition of further restrictions. GPLv3 allows a very limited set of them, in section 7, but any other added restriction can be removed by the user.</p>
<p>More generally, a license that limits who can use a program, or for what, is <a href="https://www.gnu.org/philosophy/free-sw.html" rel="noreferrer">not a free software license</a>.</p>
</blockquote>
<p>I'd also recommend looking into  <a href="https://www.gnu.org/philosophy/programs-must-not-limit-freedom-to-run.html" rel="noreferrer">&quot;Why programs must not limit the freedom to run them&quot;</a> (the page linked by the FAQ).<br />
Stallman there argues (among other lines) that copyright is about limiting, well, copies rather than running the program. Similar to limiting the production of copies of a book as opposed to restricting what you are allowed to do with the information contained in the book. (I may add: or restricting who is allowed to read it.) Also, &quot;Imagine selling pens with conditions about what you can write with them.&quot;</p>
<p>(So this is basically the FSF's position)</p>
<hr />
<p>The <a href="https://opensource.org/osd" rel="noreferrer">OSI definition</a> of what requirements a software license must meet in order to be considered open source by them has relevant clauses:</p>
<ul>
<li>
<ol>
<li>Free Redistribution<br />
(though this says that anyone can distribute the software, it does not directly talk about restricting to whom the software may be given)</li>
</ol>
</li>
<li>
<ol start="5">
<li>No Discrimination Against Persons or Groups</li>
</ol>
</li>
<li>
<ol start="6">
<li>No Discrimination Against Fields of Endeavor</li>
</ol>
</li>
</ul>
<p>The <a href="https://opensource.org/newsletter/OSI-mar-2022" rel="noreferrer">OSI has a newsletter post &quot;Open Source responds to the Russia-Ukraine war: First thoughts from the Executive Director&quot;</a>, which links to a <a href="https://thenewstack.io/where-does-open-source-fit-into-russias-war-with-ukraine/" rel="noreferrer">further discussion on the topic</a>. This is more about politics and ethics than legal questions. However, I think it's relevant in 2 ways:</p>
<ol>
<li><p>For the situation at hand: They point out that while the open source definitions do not allow the license to have such restrictions, there is nothing that forces you (or a repository provider) to serve &quot;customers&quot; from all regions worldwide. I.e., geoblocking downloads is not prohibited by the FOSS licenses.</p>
</li>
<li><p>It does show that there is a discussion on licenses that are somewhat more restrictive than the current open source definitions. As <a href="https://law.stackexchange.com/a/78480/9286">David Siegel points out</a>, there's nothing to keep you from putting such restrictions into a proprietary license. And if there are sufficiently many people who want to do that, we may see &quot;more restricted open source&quot; licenses in the future.<br />
(IANAL, but I'd expect there may be limits to what can be restricted in a boilerplate license wrt. anti-discrimination laws.)</p>
</li>
</ol>
<hr />
<p>Independently of what the license allows, people are anyways bound by general law, e.g. sanctions.</p>

<p>Frame challenge: why would you want to implement such a restriction with a license? If relevant laws/sanctions prevent conveying the software to a party in or associated with Russia (or whatever nation), they already do that without you writing such a restriction into your license.</p>
<p>If your goal is to impose your own sanctions beyond the law in the relevant jurisdiction, you could write your own such license (or modify an existing one) that grants the permissions to copy and distribute, etc., only as long as the recipient is not [whatever]. As others have noted, this would not be an Open Source license, as the term &quot;Open Source&quot; <strike>is a trademark</strike> was launched with an intent to be a trademark, which apparently didn't materialize, but still carries with it a very specific defined meaning among people who use the term which excludes the kind of restrictions you're asking for. It would also not be very effective, since anyone in the jurisdiction you're trying to sanction is not subject to the laws of your jurisdiction. In theory you could try to find out who gave it to them and sue that person for copyright infringement, but it's unlikely you would be able to obtain evidence of that unless they just publicly admitted it.</p>
<p>In short: license terms are relevant only to parties who have reason to want to follow the laws in the relevant jurisdictions.</p>
<p>Update on &quot;trademark&quot; issue: While Open Source is not a trademark, the Ninth Circuit <a href="https://opensource.org/node/1218" rel="nofollow noreferrer">just affirmed</a> a ruling that calling software Open Source when it doesn't meet the definition is false advertising.</p>

<p>As <a href="https://law.stackexchange.com/a/78478/17500">this answer</a> and <a href="https://law.stackexchange.com/questions/78474/open-source-license-restrictions-and-recent-sanctions-against-russia#comment167289_78474">this comment</a> point out, such a license would not be an open source license, nor a free software license as those terms are usually defined.</p>
<p>I am not aware of any standard or widely used permissive license that includes such a restriction, or an option for adding one.  A license including such a restriction could be written, perhaps by starting with some open source or permissive license and modifying it. However, I do not see any practical way to enforce such a restriction.</p>

<blockquote>
<p>Does there exist an open source license like GPL, GPLv2, BSD and so on which allows author to prohibit usage of the licensed software in some country?</p>
</blockquote>
<p>Nope. And it's for the same reason you can't put a &quot;license page&quot; in a book that stops people from reading it in Arkansas.</p>
<p>A person who possesses a lawfully-made copy of your work already has the right to use it anywhere just as a person who possesses a lawfully-made copy of a book already has the right to read it anywhere. To take a right away from someone, you must offer them something in exchange and obtain their agreement to the exchange. A simple license doesn't do that.</p>
<p>You might be able to do this with a shrink wrap or click-through agreement. But you can't do it with just a license. It is not sufficient to say that they can't use it in Russia -- you must get them to actually agree not to use it in Russia and you must offer them something in exchange for that agreement.</p>

<p>You might be able to make it illegal for Mafia or drug dealers to use your software (or not), but they’ll just laugh about it. But a nation state can just change its IP laws and use the software ”legally”.</p>

licensing sanctions